diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2013-12-10 14:35:47 +0400 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2016-01-25 17:15:34 +0300 |
commit | fbe21cee2531ce936d26561f3a507823935514ab (patch) | |
tree | 35182a634ab284d7237bc11b558de2aba9cb4bd6 /arch | |
parent | 598881da2122c95d2558927f0c3f09c0d283e895 (diff) | |
download | linux-fbe21cee2531ce936d26561f3a507823935514ab.tar.xz |
m68k/mm: Check for mm != NULL in do_page_fault() debug code
commit 4e25c0e92f8eaf69bc51d1d523bcb7268e7dd162 upstream.
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>
Cc: Oliver Neukum <ONeukum@suse.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'arch')
-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 f0eef0491f77..97136b5e47e0 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, #ifdef DEBUG printk ("do page fault:\nregs->sr=%#x, regs->pc=%#lx, address=%#lx, %ld, %p\n", - regs->sr, regs->pc, address, error_code, - current->mm->pgd); + regs->sr, regs->pc, address, error_code, mm ? mm->pgd : NULL); #endif /* |