1
0
Fork 0

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>
wifi-calibration
Geert Uytterhoeven 2013-12-10 11:35:47 +01:00
parent 9da4a8d919
commit 4e25c0e92f
1 changed files with 1 additions and 2 deletions

View File

@ -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
/*