summaryrefslogtreecommitdiffstats
path: root/arch/arm64/mm
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2018-09-22 10:37:15 +0200
committerEric W. Biederman <ebiederm@xmission.com>2018-09-27 21:54:51 +0200
commitb4d5557caa07a01796ca8a2d756eeaa5308f6876 (patch)
tree37bd3a6073a48da0be4864bf298359e1a88f932a /arch/arm64/mm
parentfeca355b3d8eba3a2cbca63c97a59a14681983f7 (diff)
downloadblackbird-obmc-linux-b4d5557caa07a01796ca8a2d756eeaa5308f6876.tar.gz
blackbird-obmc-linux-b4d5557caa07a01796ca8a2d756eeaa5308f6876.zip
signal/arm64: Add and use arm64_force_sig_mceerr as appropriate
Add arm64_force_sig_mceerr for consistency with arm64_force_sig_fault, and use it in the one location that can take advantage of it. This removes the fiddly filling out of siginfo before sending a signal reporting an memory error to userspace. Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> Tested-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'arch/arm64/mm')
-rw-r--r--arch/arm64/mm/fault.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c
index 66c295019a9a..f0ccb209d181 100644
--- a/arch/arm64/mm/fault.c
+++ b/arch/arm64/mm/fault.c
@@ -422,7 +422,6 @@ static int __kprobes do_page_fault(unsigned long addr, unsigned int esr,
const struct fault_info *inf;
struct task_struct *tsk;
struct mm_struct *mm;
- struct siginfo si;
vm_fault_t fault, major = 0;
unsigned long vm_flags = VM_READ | VM_WRITE;
unsigned int mm_flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE;
@@ -574,12 +573,8 @@ retry:
if (fault & VM_FAULT_HWPOISON_LARGE)
lsb = hstate_index_to_shift(VM_FAULT_GET_HINDEX(fault));
- clear_siginfo(&si);
- si.si_signo = SIGBUS;
- si.si_code = BUS_MCEERR_AR;
- si.si_addr = (void __user *)addr;
- si.si_addr_lsb = lsb;
- arm64_force_sig_info(&si, inf->name);
+ arm64_force_sig_mceerr(BUS_MCEERR_AR, (void __user *)addr, lsb,
+ inf->name);
} else {
/*
* Something tried to access memory that isn't in our memory
OpenPOWER on IntegriCloud