From: Graf Yang Date: Mon, 20 Apr 2009 09:20:58 +0000 (+0000) Subject: Blackfin: fix bug found by traps test case 21 X-Git-Tag: v2.6.31-rc1~361^2~54 X-Git-Url: http://bbs.cooldavid.org/git/?a=commitdiff_plain;h=4b402e3a54a46505692ec8215231e2ede46a4aeb;p=net-next-2.6.git Blackfin: fix bug found by traps test case 21 The traps test case 21 "exception 0x3f: l1_instruction_access" would make the kernel panic on BF533's because we end up calling show_stack() infinitely. Signed-off-by: Graf Yang Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu --- diff --git a/arch/blackfin/mm/isram-driver.c b/arch/blackfin/mm/isram-driver.c index 22913e7a181..c080e70f98b 100644 --- a/arch/blackfin/mm/isram-driver.c +++ b/arch/blackfin/mm/isram-driver.c @@ -125,7 +125,7 @@ static bool isram_check_addr(const void *addr, size_t n) { if ((addr >= (void *)L1_CODE_START) && (addr < (void *)(L1_CODE_START + L1_CODE_LENGTH))) { - if ((addr + n) >= (void *)(L1_CODE_START + L1_CODE_LENGTH)) { + if ((addr + n) > (void *)(L1_CODE_START + L1_CODE_LENGTH)) { show_stack(NULL, NULL); printk(KERN_ERR "isram_memcpy: copy involving %p length " "(%zu) too long\n", addr, n);