signal/powerpc: Call force_sig_fault from _exception
authorEric W. Biederman <ebiederm@xmission.com>
Tue, 18 Sep 2018 07:43:32 +0000 (09:43 +0200)
committerEric W. Biederman <ebiederm@xmission.com>
Fri, 21 Sep 2018 13:50:40 +0000 (15:50 +0200)
The callers of _exception don't need the pkey exception logic because
they are not processing a pkey exception.  So just call exception_common
directly and then call force_sig_fault to generate the appropriate siginfo
and deliver the appropriate signal.

Reviewed-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
arch/powerpc/kernel/traps.c

index f6c778b..c38bec5 100644 (file)
@@ -380,7 +380,10 @@ void _exception_pkey(int signr, struct pt_regs *regs, int code, unsigned long ad
 
 void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr)
 {
-       _exception_pkey(signr, regs, code, addr, 0);
+       if (!exception_common(signr, regs, code, addr))
+               return;
+
+       force_sig_fault(signr, code, (void __user *)addr, current);
 }
 
 void system_reset_exception(struct pt_regs *regs)