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