aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/sh/mm/fault.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/sh/mm/fault.c b/arch/sh/mm/fault.c
index 7a03ffe6dadd..dc461d2bc183 100644
--- a/arch/sh/mm/fault.c
+++ b/arch/sh/mm/fault.c
@@ -210,10 +210,11 @@ asmlinkage int __do_page_fault(struct pt_regs *regs, unsigned long writeaccess,
210 * are always mapped, whether it be due to legacy behaviour in 210 * are always mapped, whether it be due to legacy behaviour in
211 * 29-bit mode, or due to PMB configuration in 32-bit mode. 211 * 29-bit mode, or due to PMB configuration in 32-bit mode.
212 */ 212 */
213 if (address >= P3SEG && address < P3_ADDR_MAX) 213 if (address >= P3SEG && address < P3_ADDR_MAX) {
214 pgd = pgd_offset_k(address); 214 pgd = pgd_offset_k(address);
215 else { 215 mm = NULL;
216 if (unlikely(address >= TASK_SIZE || !current->mm)) 216 } else {
217 if (unlikely(address >= TASK_SIZE || !(mm = current->mm)))
217 return 1; 218 return 1;
218 219
219 pgd = pgd_offset(current->mm, address); 220 pgd = pgd_offset(current->mm, address);