aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/mm/fault.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/mm/fault.c')
-rw-r--r--arch/sh/mm/fault.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/arch/sh/mm/fault.c b/arch/sh/mm/fault.c
index dc461d2bc183..c69fd603226a 100644
--- a/arch/sh/mm/fault.c
+++ b/arch/sh/mm/fault.c
@@ -13,6 +13,8 @@
13 */ 13 */
14#include <linux/kernel.h> 14#include <linux/kernel.h>
15#include <linux/mm.h> 15#include <linux/mm.h>
16#include <linux/hardirq.h>
17#include <linux/kprobes.h>
16#include <asm/system.h> 18#include <asm/system.h>
17#include <asm/mmu_context.h> 19#include <asm/mmu_context.h>
18#include <asm/kgdb.h> 20#include <asm/kgdb.h>
@@ -188,15 +190,16 @@ do_sigbus:
188/* 190/*
189 * Called with interrupts disabled. 191 * Called with interrupts disabled.
190 */ 192 */
191asmlinkage int __do_page_fault(struct pt_regs *regs, unsigned long writeaccess, 193asmlinkage int __kprobes __do_page_fault(struct pt_regs *regs,
192 unsigned long address) 194 unsigned long writeaccess,
195 unsigned long address)
193{ 196{
194 pgd_t *pgd; 197 pgd_t *pgd;
195 pud_t *pud; 198 pud_t *pud;
196 pmd_t *pmd; 199 pmd_t *pmd;
197 pte_t *pte; 200 pte_t *pte;
198 pte_t entry; 201 pte_t entry;
199 struct mm_struct *mm; 202 struct mm_struct *mm = current->mm;
200 spinlock_t *ptl; 203 spinlock_t *ptl;
201 int ret = 1; 204 int ret = 1;
202 205
@@ -214,10 +217,10 @@ asmlinkage int __do_page_fault(struct pt_regs *regs, unsigned long writeaccess,
214 pgd = pgd_offset_k(address); 217 pgd = pgd_offset_k(address);
215 mm = NULL; 218 mm = NULL;
216 } else { 219 } else {
217 if (unlikely(address >= TASK_SIZE || !(mm = current->mm))) 220 if (unlikely(address >= TASK_SIZE || !mm))
218 return 1; 221 return 1;
219 222
220 pgd = pgd_offset(current->mm, address); 223 pgd = pgd_offset(mm, address);
221 } 224 }
222 225
223 pud = pud_offset(pgd, address); 226 pud = pud_offset(pgd, address);