diff options
-rw-r--r-- | arch/x86_64/mm/fault.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/x86_64/mm/fault.c b/arch/x86_64/mm/fault.c index de91e17daf6f..316c53de47bd 100644 --- a/arch/x86_64/mm/fault.c +++ b/arch/x86_64/mm/fault.c | |||
@@ -314,11 +314,13 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, | |||
314 | unsigned long flags; | 314 | unsigned long flags; |
315 | siginfo_t info; | 315 | siginfo_t info; |
316 | 316 | ||
317 | tsk = current; | ||
318 | mm = tsk->mm; | ||
319 | prefetchw(&mm->mmap_sem); | ||
320 | |||
317 | /* get the address */ | 321 | /* get the address */ |
318 | __asm__("movq %%cr2,%0":"=r" (address)); | 322 | __asm__("movq %%cr2,%0":"=r" (address)); |
319 | 323 | ||
320 | tsk = current; | ||
321 | mm = tsk->mm; | ||
322 | info.si_code = SEGV_MAPERR; | 324 | info.si_code = SEGV_MAPERR; |
323 | 325 | ||
324 | 326 | ||