Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1465282
| From | Josh Poimboeuf <jpoimboe@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v4 08/57] x86/dumpstack: fix irq stack bounds calculation in show_stack_log_lvl() |
| Date | 2016-08-18 15:20 +0200 |
| Message-ID | <s7voK-ho-37@gated-at.bofh.it> (permalink) |
| References | <s7vf3-dJ-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
The percpu irq_stack_ptr variable has a 64-byte gap from the end of the allocated irq stack area, so subtracting IRQ_STACK_SIZE from it actually results in a value 64 bytes before the beginning of the stack. Use IRQ_USABLE_STACK_SIZE instead. Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> --- arch/x86/kernel/dumpstack_64.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/dumpstack_64.c b/arch/x86/kernel/dumpstack_64.c index 7ea6ed0..0fdd371 100644 --- a/arch/x86/kernel/dumpstack_64.c +++ b/arch/x86/kernel/dumpstack_64.c @@ -253,8 +253,8 @@ show_stack_log_lvl(struct task_struct *task, struct pt_regs *regs, preempt_disable(); cpu = smp_processor_id(); - irq_stack_end = (unsigned long *)(per_cpu(irq_stack_ptr, cpu)); - irq_stack = (unsigned long *)(per_cpu(irq_stack_ptr, cpu) - IRQ_STACK_SIZE); + irq_stack_end = (unsigned long *)(per_cpu(irq_stack_ptr, cpu)); + irq_stack = irq_stack_end - (IRQ_USABLE_STACK_SIZE / sizeof(long)); /* * Debugging aid: "show_stack(NULL, NULL);" prints the -- 2.7.4
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH v4 08/57] x86/dumpstack: fix irq stack bounds calculation in show_stack_log_lvl() Josh Poimboeuf <jpoimboe@redhat.com> - 2016-08-18 15:20 +0200
csiph-web