提交 4e25c0e9 编写于 作者: G Geert Uytterhoeven

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: NGeert Uytterhoeven <geert@linux-m68k.org>
上级 9da4a8d9
...@@ -77,8 +77,7 @@ int do_page_fault(struct pt_regs *regs, unsigned long address, ...@@ -77,8 +77,7 @@ int do_page_fault(struct pt_regs *regs, unsigned long address,
#ifdef DEBUG #ifdef DEBUG
printk ("do page fault:\nregs->sr=%#x, regs->pc=%#lx, address=%#lx, %ld, %p\n", printk ("do page fault:\nregs->sr=%#x, regs->pc=%#lx, address=%#lx, %ld, %p\n",
regs->sr, regs->pc, address, error_code, regs->sr, regs->pc, address, error_code, mm ? mm->pgd : NULL);
current->mm->pgd);
#endif #endif
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册