diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2013-12-10 05:35:47 -0500 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2013-12-30 15:01:09 -0500 |
commit | 4e25c0e92f8eaf69bc51d1d523bcb7268e7dd162 (patch) | |
tree | 55125e7e00544bfca2beafebcf31795be8279caf /arch/m68k | |
parent | 9da4a8d9197e42d532f2e2af072d8219105139b2 (diff) |
m68k/mm: Check for mm != NULL in do_page_fault() debug code
When DEBUG is enabled, do_page_fault() may dereference a NULL pointer,
causing recursive bus errors.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68k')
-rw-r--r-- | arch/m68k/mm/fault.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/m68k/mm/fault.c b/arch/m68k/mm/fault.c index eb1d61f68725..c7725f1de05d 100644 --- a/arch/m68k/mm/fault.c +++ b/arch/m68k/mm/fault.c | |||
@@ -77,8 +77,7 @@ int do_page_fault(struct pt_regs *regs, unsigned long address, | |||
77 | 77 | ||
78 | #ifdef DEBUG | 78 | #ifdef DEBUG |
79 | printk ("do page fault:\nregs->sr=%#x, regs->pc=%#lx, address=%#lx, %ld, %p\n", | 79 | printk ("do page fault:\nregs->sr=%#x, regs->pc=%#lx, address=%#lx, %ld, %p\n", |
80 | regs->sr, regs->pc, address, error_code, | 80 | regs->sr, regs->pc, address, error_code, mm ? mm->pgd : NULL); |
81 | current->mm->pgd); | ||
82 | #endif | 81 | #endif |
83 | 82 | ||
84 | /* | 83 | /* |