summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2018-09-18 11:26:32 +0200
committerEric W. Biederman <ebiederm@xmission.com>2018-09-21 15:53:00 +0200
commit77c70728db9fb2d7698e8228f9978197c8f4f411 (patch)
treee818c457e975081cefd346498005144e625afece
parentsignal/powerpc: Specialize _exception_pkey for handling pkey exceptions (diff)
downloadlinux-77c70728db9fb2d7698e8228f9978197c8f4f411.tar.xz
linux-77c70728db9fb2d7698e8228f9978197c8f4f411.zip
signal/powerpc: Simplify _exception_pkey by using force_sig_pkuerr
Call force_sig_pkuerr directly instead of rolling it by hand in _exception_pkey. Reviewed-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
-rw-r--r--arch/powerpc/kernel/traps.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index e5ea69222459..ab1bd06d7c44 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -364,18 +364,10 @@ static bool exception_common(int signr, struct pt_regs *regs, int code,
void _exception_pkey(struct pt_regs *regs, unsigned long addr, int key)
{
- siginfo_t info;
-
if (!exception_common(SIGSEGV, regs, SEGV_PKUERR, addr))
return;
- clear_siginfo(&info);
- info.si_signo = SIGSEGV;
- info.si_code = SEGV_PKUERR;
- info.si_addr = (void __user *) addr;
- info.si_pkey = key;
-
- force_sig_info(info.si_signo, &info, current);
+ force_sig_pkuerr((void __user *) addr, key);
}
void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr)