summaryrefslogtreecommitdiff
path: root/arch/s390/include/asm/stacktrace.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/include/asm/stacktrace.h')
-rw-r--r--arch/s390/include/asm/stacktrace.h2
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;
}