ARM: 9484/1: enable interrupts when unhandled user faults are triggered
authorXie Yuanbin <xieyuanbin1@huawei.com>
Tue, 28 Jul 2026 02:03:22 +0000 (03:03 +0100)
committerRussell King <rmk+kernel@armlinux.org.uk>
Wed, 5 Aug 2026 15:15:13 +0000 (16:15 +0100)
PREEMPT_RT requires interrupts to be enabled when sending signals.

When do_DataAbort()/do_PrefetchAbort() triggers unhandled user faults,
that is `inf->fn()` return a non-zero value, and the interrupts are not
enabled within the hook function, force_sig_fault() will be called
with interrupts disabled.

This can be triggered by user programs executing the bkpt instruction,
with kernel config CONFIG_PERF_EVENTS=n.

Enable interrupts in do_DataAbort()/do_PrefetchAbort() when unhandled
user faults are triggered to fix the issue.

Fixes: c6e61c06d606 ("ARM: 9463/1: Allow to enable RT")
Link: https://lore.kernel.org/20260629123349.134224-1-xieyuanbin1@huawei.com
Suggested-by: Russell King <rmk+kernel@armlinux.org.uk>
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Signed-off-by: Xie Yuanbin <xieyuanbin1@huawei.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
arch/arm/mm/fault.c

index e62cc4b..c686775 100644 (file)
@@ -633,6 +633,9 @@ do_DataAbort(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
        if (!inf->fn(addr, fsr & ~FSR_LNX_PF, regs))
                return;
 
+       if (likely(user_mode(regs)))
+               local_irq_enable();
+
        pr_alert("8<--- cut here ---\n");
        pr_alert("Unhandled fault: %s (0x%03x) at 0x%08lx\n",
                inf->name, fsr, addr);
@@ -663,6 +666,9 @@ do_PrefetchAbort(unsigned long addr, unsigned int ifsr, struct pt_regs *regs)
        if (!inf->fn(addr, ifsr | FSR_LNX_PF, regs))
                return;
 
+       if (likely(user_mode(regs)))
+               local_irq_enable();
+
        pr_alert("8<--- cut here ---\n");
        pr_alert("Unhandled prefetch abort: %s (0x%03x) at 0x%08lx\n",
                inf->name, ifsr, addr);