diff options
Diffstat (limited to 'arch/powerpc/mm/fault.c')
-rw-r--r-- | arch/powerpc/mm/fault.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c index b396868d2aa7..6d535973b200 100644 --- a/arch/powerpc/mm/fault.c +++ b/arch/powerpc/mm/fault.c | |||
@@ -33,13 +33,13 @@ | |||
33 | #include <linux/ratelimit.h> | 33 | #include <linux/ratelimit.h> |
34 | #include <linux/context_tracking.h> | 34 | #include <linux/context_tracking.h> |
35 | #include <linux/hugetlb.h> | 35 | #include <linux/hugetlb.h> |
36 | #include <linux/uaccess.h> | ||
36 | 37 | ||
37 | #include <asm/firmware.h> | 38 | #include <asm/firmware.h> |
38 | #include <asm/page.h> | 39 | #include <asm/page.h> |
39 | #include <asm/pgtable.h> | 40 | #include <asm/pgtable.h> |
40 | #include <asm/mmu.h> | 41 | #include <asm/mmu.h> |
41 | #include <asm/mmu_context.h> | 42 | #include <asm/mmu_context.h> |
42 | #include <asm/uaccess.h> | ||
43 | #include <asm/tlbflush.h> | 43 | #include <asm/tlbflush.h> |
44 | #include <asm/siginfo.h> | 44 | #include <asm/siginfo.h> |
45 | #include <asm/debug.h> | 45 | #include <asm/debug.h> |
@@ -272,15 +272,16 @@ int __kprobes do_page_fault(struct pt_regs *regs, unsigned long address, | |||
272 | if (!arch_irq_disabled_regs(regs)) | 272 | if (!arch_irq_disabled_regs(regs)) |
273 | local_irq_enable(); | 273 | local_irq_enable(); |
274 | 274 | ||
275 | if (in_atomic() || mm == NULL) { | 275 | if (faulthandler_disabled() || mm == NULL) { |
276 | if (!user_mode(regs)) { | 276 | if (!user_mode(regs)) { |
277 | rc = SIGSEGV; | 277 | rc = SIGSEGV; |
278 | goto bail; | 278 | goto bail; |
279 | } | 279 | } |
280 | /* in_atomic() in user mode is really bad, | 280 | /* faulthandler_disabled() in user mode is really bad, |
281 | as is current->mm == NULL. */ | 281 | as is current->mm == NULL. */ |
282 | printk(KERN_EMERG "Page fault in user mode with " | 282 | printk(KERN_EMERG "Page fault in user mode with " |
283 | "in_atomic() = %d mm = %p\n", in_atomic(), mm); | 283 | "faulthandler_disabled() = %d mm = %p\n", |
284 | faulthandler_disabled(), mm); | ||
284 | printk(KERN_EMERG "NIP = %lx MSR = %lx\n", | 285 | printk(KERN_EMERG "NIP = %lx MSR = %lx\n", |
285 | regs->nip, regs->msr); | 286 | regs->nip, regs->msr); |
286 | die("Weird page fault", regs, SIGSEGV); | 287 | die("Weird page fault", regs, SIGSEGV); |