summaryrefslogtreecommitdiffstats
path: root/arch/arm64/mm
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2018-09-22 09:37:55 +0200
committerEric W. Biederman <ebiederm@xmission.com>2018-09-27 21:53:54 +0200
commitf29ad209e428f5bc596de39dd9b8d73db5739920 (patch)
tree4df109612ed9d0d6c8a24402c31660624f27e96b /arch/arm64/mm
parent1628a7cc85db7eced9cd8195fd66574a35470825 (diff)
downloadblackbird-obmc-linux-f29ad209e428f5bc596de39dd9b8d73db5739920.tar.gz
blackbird-obmc-linux-f29ad209e428f5bc596de39dd9b8d73db5739920.zip
signal/arm64: Factor set_thread_esr out of __do_user_fault
This pepares for sending signals with something other than arm64_force_sig_info. 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, 7 insertions, 2 deletions
diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c
index f42aff0e90ad..654a861c4bd0 100644
--- a/arch/arm64/mm/fault.c
+++ b/arch/arm64/mm/fault.c
@@ -297,9 +297,9 @@ static void __do_kernel_fault(unsigned long addr, unsigned int esr,
die_kernel_fault(msg, addr, esr, regs);
}
-static void __do_user_fault(struct siginfo *info, unsigned int esr)
+static void set_thread_esr(unsigned long address, unsigned int esr)
{
- current->thread.fault_address = (unsigned long)info->si_addr;
+ current->thread.fault_address = address;
/*
* If the faulting address is in the kernel, we must sanitize the ESR.
@@ -352,6 +352,11 @@ static void __do_user_fault(struct siginfo *info, unsigned int esr)
}
current->thread.fault_code = esr;
+}
+
+static void __do_user_fault(struct siginfo *info, unsigned int esr)
+{
+ set_thread_esr((unsigned long)info->si_addr, esr);
arm64_force_sig_info(info, esr_to_fault_info(esr)->name);
}
OpenPOWER on IntegriCloud