[PATCH 1/2] powerpc: Add VM_FAULT_HWPOISON handling to powerpc page fault handler

Stephen Rothwell sfr at canb.auug.org.au
Wed Sep 24 16:40:05 EST 2014


Hi Anton,

On Wed, 24 Sep 2014 10:27:06 +1000 Anton Blanchard <anton at samba.org> 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 at canb.auug.org.au
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20140924/15642aa1/attachment.sig>


More information about the Linuxppc-dev mailing list