From: Sonic Zhang Date: Thu, 16 Jul 2009 10:36:35 +0000 (+0000) Subject: Blackfin: do not try displaying the end of the stack X-Git-Tag: MMI-PSA29.97-13-9~26935^2~43 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=407505dc01ac2b4f2944cd3c6a0c02473ffb869e;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git Blackfin: do not try displaying the end of the stack The end of the stack may not be valid (and that could be OK), so do not attempt to parse it. If we do, we might use a bad pointer in kernel space which makes things panic(). Signed-off-by: Sonic Zhang Signed-off-by: Mike Frysinger --- diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c index 519accaf4afc..18c6cd4150f8 100644 --- a/arch/blackfin/kernel/traps.c +++ b/arch/blackfin/kernel/traps.c @@ -911,7 +911,7 @@ void show_stack(struct task_struct *task, unsigned long *stack) frame_no = 0; for (addr = (unsigned int *)((unsigned int)stack & ~0xF), i = 0; - addr <= endstack; addr++, i++) { + addr < endstack; addr++, i++) { ret_addr = 0; if (!j && i % 8 == 0)