From 407505dc01ac2b4f2944cd3c6a0c02473ffb869e Mon Sep 17 00:00:00 2001 From: Sonic Zhang Date: Thu, 16 Jul 2009 10:36:35 +0000 Subject: [PATCH] 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 --- arch/blackfin/kernel/traps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.20.1