diff options
Diffstat (limited to 'arch/sh/kernel/stacktrace.c')
-rw-r--r-- | arch/sh/kernel/stacktrace.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/arch/sh/kernel/stacktrace.c b/arch/sh/kernel/stacktrace.c index 0d5268afe80f..4bdd2f83535d 100644 --- a/arch/sh/kernel/stacktrace.c +++ b/arch/sh/kernel/stacktrace.c | |||
@@ -19,14 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | void save_stack_trace(struct stack_trace *trace, struct task_struct *task) | 20 | void save_stack_trace(struct stack_trace *trace, struct task_struct *task) |
21 | { | 21 | { |
22 | unsigned long *sp; | 22 | unsigned long *sp = (unsigned long *)current_stack_pointer; |
23 | |||
24 | if (!task) | ||
25 | task = current; | ||
26 | if (task == current) | ||
27 | sp = (unsigned long *)current_stack_pointer; | ||
28 | else | ||
29 | sp = (unsigned long *)task->thread.sp; | ||
30 | 23 | ||
31 | while (!kstack_end(sp)) { | 24 | while (!kstack_end(sp)) { |
32 | unsigned long addr = *sp++; | 25 | unsigned long addr = *sp++; |