Skip to content

Commit

Permalink
Blackfin: fix bug found by traps test case 21
Browse files Browse the repository at this point in the history
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 <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
  • Loading branch information
Graf Yang authored and Mike Frysinger committed Jun 12, 2009
1 parent 5d89137 commit 4b402e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/blackfin/mm/isram-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4b402e3

Please sign in to comment.