s390/stacktrace: add missing end marker
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Mon, 1 Feb 2016 13:06:57 +0000 (14:06 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 10 Feb 2016 08:25:21 +0000 (09:25 +0100)
save_stack_trace() did not write the ULONG_MAX end marker if there is
enough space left. So simply follow x86 and arm64.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Tested-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/kernel/stacktrace.c

index 225bed00aa927c46daf5826bf44df68d0796208b..75e6ea930692b4462e7346db10b7b724b81011e2 100644 (file)
@@ -79,6 +79,8 @@ void save_stack_trace(struct stack_trace *trace)
        save_context_stack(trace, new_sp,
                           S390_lowcore.thread_info,
                           S390_lowcore.thread_info + THREAD_SIZE, 1);
+       if (trace->nr_entries < trace->max_entries)
+               trace->entries[trace->nr_entries++] = ULONG_MAX;
 }
 EXPORT_SYMBOL_GPL(save_stack_trace);