diff options
Diffstat (limited to 'arch/i386')
-rw-r--r-- | arch/i386/kernel/stacktrace.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/arch/i386/kernel/stacktrace.c b/arch/i386/kernel/stacktrace.c index e62a037ab399..ae3c32a87add 100644 --- a/arch/i386/kernel/stacktrace.c +++ b/arch/i386/kernel/stacktrace.c | |||
@@ -61,12 +61,8 @@ save_context_stack(struct stack_trace *trace, unsigned int skip, | |||
61 | 61 | ||
62 | /* | 62 | /* |
63 | * Save stack-backtrace addresses into a stack_trace buffer. | 63 | * Save stack-backtrace addresses into a stack_trace buffer. |
64 | * If all_contexts is set, all contexts (hardirq, softirq and process) | ||
65 | * are saved. If not set then only the current context is saved. | ||
66 | */ | 64 | */ |
67 | void save_stack_trace(struct stack_trace *trace, | 65 | void save_stack_trace(struct stack_trace *trace, struct task_struct *task) |
68 | struct task_struct *task, int all_contexts, | ||
69 | unsigned int skip) | ||
70 | { | 66 | { |
71 | unsigned long ebp; | 67 | unsigned long ebp; |
72 | unsigned long *stack = &ebp; | 68 | unsigned long *stack = &ebp; |
@@ -85,10 +81,9 @@ void save_stack_trace(struct stack_trace *trace, | |||
85 | struct thread_info *context = (struct thread_info *) | 81 | struct thread_info *context = (struct thread_info *) |
86 | ((unsigned long)stack & (~(THREAD_SIZE - 1))); | 82 | ((unsigned long)stack & (~(THREAD_SIZE - 1))); |
87 | 83 | ||
88 | ebp = save_context_stack(trace, skip, context, stack, ebp); | 84 | ebp = save_context_stack(trace, trace->skip, context, stack, ebp); |
89 | stack = (unsigned long *)context->previous_esp; | 85 | stack = (unsigned long *)context->previous_esp; |
90 | if (!all_contexts || !stack || | 86 | if (!stack || trace->nr_entries >= trace->max_entries) |
91 | trace->nr_entries >= trace->max_entries) | ||
92 | break; | 87 | break; |
93 | trace->entries[trace->nr_entries++] = ULONG_MAX; | 88 | trace->entries[trace->nr_entries++] = ULONG_MAX; |
94 | if (trace->nr_entries >= trace->max_entries) | 89 | if (trace->nr_entries >= trace->max_entries) |