Commit faa75e14 authored by Dongjiu Geng's avatar Dongjiu Geng Committed by Will Deacon

arm64: fault: avoid send SIGBUS two times

do_sea() calls arm64_notify_die() which will always signal
user-space. It also returns whether APEI claimed the external
abort as a RAS notification. If it returns failure do_mem_abort()
will signal user-space too.

do_mem_abort() wants to know if we handled the error, we always
call arm64_notify_die() so can always return success.
Signed-off-by: default avatarDongjiu Geng <gengdongjiu@huawei.com>
Reviewed-by: default avatarJames Morse <james.morse@arm.com>
Reviewed-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
parent 0e17cada
...@@ -574,7 +574,6 @@ static int do_sea(unsigned long addr, unsigned int esr, struct pt_regs *regs) ...@@ -574,7 +574,6 @@ static int do_sea(unsigned long addr, unsigned int esr, struct pt_regs *regs)
{ {
struct siginfo info; struct siginfo info;
const struct fault_info *inf; const struct fault_info *inf;
int ret = 0;
inf = esr_to_fault_info(esr); inf = esr_to_fault_info(esr);
pr_err("Synchronous External Abort: %s (0x%08x) at 0x%016lx\n", pr_err("Synchronous External Abort: %s (0x%08x) at 0x%016lx\n",
...@@ -589,7 +588,7 @@ static int do_sea(unsigned long addr, unsigned int esr, struct pt_regs *regs) ...@@ -589,7 +588,7 @@ static int do_sea(unsigned long addr, unsigned int esr, struct pt_regs *regs)
if (interrupts_enabled(regs)) if (interrupts_enabled(regs))
nmi_enter(); nmi_enter();
ret = ghes_notify_sea(); ghes_notify_sea();
if (interrupts_enabled(regs)) if (interrupts_enabled(regs))
nmi_exit(); nmi_exit();
...@@ -604,7 +603,7 @@ static int do_sea(unsigned long addr, unsigned int esr, struct pt_regs *regs) ...@@ -604,7 +603,7 @@ static int do_sea(unsigned long addr, unsigned int esr, struct pt_regs *regs)
info.si_addr = (void __user *)addr; info.si_addr = (void __user *)addr;
arm64_notify_die("", regs, &info, esr); arm64_notify_die("", regs, &info, esr);
return ret; return 0;
} }
static const struct fault_info fault_info[] = { static const struct fault_info fault_info[] = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment