aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/fault.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/mm/fault.c')
-rw-r--r--arch/powerpc/mm/fault.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c
index 08ffcf52a856..0a6b28336eb0 100644
--- a/arch/powerpc/mm/fault.c
+++ b/arch/powerpc/mm/fault.c
@@ -133,6 +133,7 @@ static int do_sigbus(struct pt_regs *regs, unsigned long address)
133 up_read(&current->mm->mmap_sem); 133 up_read(&current->mm->mmap_sem);
134 134
135 if (user_mode(regs)) { 135 if (user_mode(regs)) {
136 current->thread.trap_nr = BUS_ADRERR;
136 info.si_signo = SIGBUS; 137 info.si_signo = SIGBUS;
137 info.si_errno = 0; 138 info.si_errno = 0;
138 info.si_code = BUS_ADRERR; 139 info.si_code = BUS_ADRERR;
@@ -450,6 +451,7 @@ good_area:
450 /* Clear FAULT_FLAG_ALLOW_RETRY to avoid any risk 451 /* Clear FAULT_FLAG_ALLOW_RETRY to avoid any risk
451 * of starvation. */ 452 * of starvation. */
452 flags &= ~FAULT_FLAG_ALLOW_RETRY; 453 flags &= ~FAULT_FLAG_ALLOW_RETRY;
454 flags |= FAULT_FLAG_TRIED;
453 goto retry; 455 goto retry;
454 } 456 }
455 } 457 }
@@ -470,7 +472,7 @@ bad_area_nosemaphore:
470 if (is_exec && (error_code & DSISR_PROTFAULT)) 472 if (is_exec && (error_code & DSISR_PROTFAULT))
471 printk_ratelimited(KERN_CRIT "kernel tried to execute NX-protected" 473 printk_ratelimited(KERN_CRIT "kernel tried to execute NX-protected"
472 " page (%lx) - exploit attempt? (uid: %d)\n", 474 " page (%lx) - exploit attempt? (uid: %d)\n",
473 address, current_uid()); 475 address, from_kuid(&init_user_ns, current_uid()));
474 476
475 return SIGSEGV; 477 return SIGSEGV;
476 478