diff options
| author | Ilya Leoshkevich <[email protected]> | 2019-10-02 10:56:27 +0000 |
|---|---|---|
| committer | Vasily Gorbik <[email protected]> | 2019-10-31 16:20:53 +0000 |
| commit | ea3f6dcfa71afb51753ad3729c29570f90d6abbc (patch) | |
| tree | 15d50b5925deaab9ec52f5605cf4891cfeb9f296 /arch/s390/include/asm/stacktrace.h | |
| parent | s390: avoid double handling of "noexec" option (diff) | |
| download | kernel-ea3f6dcfa71afb51753ad3729c29570f90d6abbc.tar.gz kernel-ea3f6dcfa71afb51753ad3729c29570f90d6abbc.zip | |
s390/unwind: fix get_stack_pointer(NULL, NULL)
unwind_for_each_frame(NULL, NULL, 0) does not return any valid frames.
The reason is that get_stack_pointer, unlike get_stack_info and
show_stack, does not handle NULL argument.
Fix by making get_stack_pointer treat NULL as current, like
get_stack_info and show_stack do.
Reviewed-by: Vasily Gorbik <[email protected]>
Tested-by: Vasily Gorbik <[email protected]>
Signed-off-by: Ilya Leoshkevich <[email protected]>
Signed-off-by: Vasily Gorbik <[email protected]>
Diffstat (limited to 'arch/s390/include/asm/stacktrace.h')
| -rw-r--r-- | arch/s390/include/asm/stacktrace.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/include/asm/stacktrace.h b/arch/s390/include/asm/stacktrace.h index 0ae4bbf7779c..fee40212af11 100644 --- a/arch/s390/include/asm/stacktrace.h +++ b/arch/s390/include/asm/stacktrace.h @@ -38,7 +38,7 @@ static inline unsigned long get_stack_pointer(struct task_struct *task, { if (regs) return (unsigned long) kernel_stack_pointer(regs); - if (task == current) + if (!task || task == current) return current_stack_pointer(); return (unsigned long) task->thread.ksp; } |
