[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <268928ebca1dde7d1a91397ef6d27ba7418dab93.1453722244.git.jslaby@suse.cz>
Date: Mon, 25 Jan 2016 12:50:01 +0100
From: Jiri Slaby <jslaby@...e.cz>
To: stable@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Oliver Neukum <ONeukum@...e.com>, Jiri Slaby <jslaby@...e.cz>
Subject: [PATCH 3.12 20/39] m68k/mm: Check for mm != NULL in do_page_fault() debug code
From: Geert Uytterhoeven <geert@...ux-m68k.org>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
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@...ux-m68k.org>
Cc: Oliver Neukum <ONeukum@...e.com>
Signed-off-by: Jiri Slaby <jslaby@...e.cz>
---
arch/m68k/mm/fault.c | 3 +--
1 file changed, 1 insertion(+), 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
/*
--
2.7.0
Powered by blists - more mailing lists