Commit 4b402e3a authored by Graf Yang's avatar Graf Yang Committed by Mike Frysinger

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: default avatarGraf Yang <graf.yang@analog.com>
Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
Signed-off-by: default avatarBryan Wu <cooloney@kernel.org>
parent 5d89137a
...@@ -125,7 +125,7 @@ static bool isram_check_addr(const void *addr, size_t n) ...@@ -125,7 +125,7 @@ static bool isram_check_addr(const void *addr, size_t n)
{ {
if ((addr >= (void *)L1_CODE_START) && if ((addr >= (void *)L1_CODE_START) &&
(addr < (void *)(L1_CODE_START + L1_CODE_LENGTH))) { (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); show_stack(NULL, NULL);
printk(KERN_ERR "isram_memcpy: copy involving %p length " printk(KERN_ERR "isram_memcpy: copy involving %p length "
"(%zu) too long\n", addr, n); "(%zu) too long\n", addr, n);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment