Re: [PATCH 1/2] powerpc: Add VM_FAULT_HWPOISON handling to powerpc page fault handler
From: Stephen Rothwell <hidden>
Date: 2014-09-24 06:40:12
Attachments
- signature.asc [application/pgp-signature] 819 bytes
From: Stephen Rothwell <hidden>
Date: 2014-09-24 06:40:12
Hi Anton, On Wed, 24 Sep 2014 10:27:06 +1000 Anton Blanchard [off-list ref] wrote:
- if (user_mode(regs)) {
- current->thread.trap_nr = BUS_ADRERR;
- info.si_signo = SIGBUS;
- info.si_errno = 0;
- info.si_code = BUS_ADRERR;
- info.si_addr = (void __user *)address;
- force_sig_info(SIGBUS, &info, current);
- return MM_FAULT_RETURN;
+ if (!user_mode(regs))
+ return MM_FAULT_ERR(SIGBUS);
+
+ current->thread.trap_nr = BUS_ADRERR;
+ info.si_signo = SIGBUS;
+ info.si_errno = 0;
+ info.si_code = BUS_ADRERR;
+ info.si_addr = (void __user *)address;If you had done this as 2 patches (one to remove the indent and a second to fix the actual problem), it would have been much easier to review ... -- Cheers, Stephen Rothwell sfr@canb.auug.org.au