Blackfin: fix bug found by traps test case 21
authorGraf Yang <graf.yang@analog.com>
Mon, 20 Apr 2009 09:20:58 +0000 (09:20 +0000)
committerMike Frysinger <vapier@gentoo.org>
Fri, 12 Jun 2009 10:03:45 +0000 (06:03 -0400)
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>
arch/blackfin/mm/isram-driver.c

index 22913e7a1818169a4909c2403da1f185858eae67..c080e70f98b0c579eafbb7d07365daaa2f8d484c 100644 (file)
@@ -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 >= (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);
                        show_stack(NULL, NULL);
                        printk(KERN_ERR "isram_memcpy: copy involving %p length "
                                        "(%zu) too long\n", addr, n);