diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2018-09-18 10:00:32 +0200 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2018-09-21 15:53:56 +0200 |
commit | f383d8b4aec3c238c8d5f56854ddc7a7c3d1cc20 (patch) | |
tree | edbf55d475451d6ab8f0bfb066f80c75efc864c7 /arch/powerpc/mm/fault.c | |
parent | signal/powerpc: Simplify _exception_pkey by using force_sig_pkuerr (diff) | |
download | linux-f383d8b4aec3c238c8d5f56854ddc7a7c3d1cc20.tar.xz linux-f383d8b4aec3c238c8d5f56854ddc7a7c3d1cc20.zip |
signal/powerpc: Use force_sig_fault where appropriate
Reviewed-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'arch/powerpc/mm/fault.c')
-rw-r--r-- | arch/powerpc/mm/fault.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c index 406d0e0ef096..1697e903bbf2 100644 --- a/arch/powerpc/mm/fault.c +++ b/arch/powerpc/mm/fault.c @@ -165,17 +165,10 @@ static noinline int bad_access(struct pt_regs *regs, unsigned long address) static int do_sigbus(struct pt_regs *regs, unsigned long address, vm_fault_t fault) { - siginfo_t info; - if (!user_mode(regs)) return SIGBUS; current->thread.trap_nr = BUS_ADRERR; - clear_siginfo(&info); - info.si_signo = SIGBUS; - info.si_errno = 0; - info.si_code = BUS_ADRERR; - info.si_addr = (void __user *)address; #ifdef CONFIG_MEMORY_FAILURE if (fault & (VM_FAULT_HWPOISON|VM_FAULT_HWPOISON_LARGE)) { unsigned int lsb = 0; /* shutup gcc */ @@ -194,7 +187,7 @@ static int do_sigbus(struct pt_regs *regs, unsigned long address, } #endif - force_sig_info(SIGBUS, &info, current); + force_sig_fault(SIGBUS, BUS_ADRERR, (void __user *)address, current); return 0; } |