From: Xie Yuanbin <xieyuanbin1@huawei.com>
To: <viro@zeniv.linux.org.uk>, <will@kernel.org>, <nico@fluxnic.net>,
<rmk+kernel@armlinux.org.uk>, <linux@armlinux.org.uk>,
<david.laight@runbox.com>, <rppt@kernel.org>, <vbabka@suse.cz>,
<pfalcato@suse.de>, <brauner@kernel.org>,
<lorenzo.stoakes@oracle.com>, <kuninori.morimoto.gx@renesas.com>,
<tony@atomide.com>, <arnd@arndb.de>, <bigeasy@linutronix.de>,
<akpm@linux-foundation.org>, <punitagrawal@gmail.com>,
<hch@lst.de>, <jack@suse.com>, <rjw@rjwysocki.net>,
<marc.zyngier@arm.com>
Cc: <linux-arm-kernel@lists.infradead.org>, <linux-mm@kvack.org>,
<linux-kernel@vger.kernel.org>, <linux-fsdevel@vger.kernel.org>,
<wozizhi@huaweicloud.com>, <liaohua4@huawei.com>,
<lilinjie8@huawei.com>, <xieyuanbin1@huawei.com>,
<pangliyuan1@huawei.com>, <wangkefeng.wang@huawei.com>
Subject: [RFC PATCH v2 2/2] ARM/mm/fault: Enable interrupts before sending signal
Date: Thu, 27 Nov 2025 22:01:09 +0800 [thread overview]
Message-ID: <20251127140109.191657-2-xieyuanbin1@huawei.com> (raw)
In-Reply-To: <20251127140109.191657-1-xieyuanbin1@huawei.com>
From: xieyuanbin1 <xieyuanbin1@huawei.com>
Sending a signal requires to acquire sighand_struct::siglock which is a
spinlock_t. On PREEMPT_RT spinlock_t becomes a sleeping spin lock which
requires interrupts to be enabled. Since the calling context is user
land, interrupts must have been enabled so it is fine to enable them in
this case.
Signed-off-by: xieyuanbin1 <xieyuanbin1@huawei.com>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
This patch depends on patch
Link: https://lore.kernel.org/20251029155918.503060-6-bigeasy@linutronix.de
The commit message is copy from:
Link: https://lore.kernel.org/20251029155918.503060-3-bigeasy@linutronix.de
Maybe I should add:
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Or something else? Thanks!
arch/arm/mm/fault.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
index 5c58072d8235..f8ee1854c854 100644
--- a/arch/arm/mm/fault.c
+++ b/arch/arm/mm/fault.c
@@ -184,10 +184,13 @@ __do_user_fault(unsigned long addr, unsigned int fsr, unsigned int sig,
struct task_struct *tsk = current;
if (addr > TASK_SIZE)
harden_branch_predictor();
+ if (IS_ENABLED(CONFIG_PREEMPT_RT))
+ local_irq_enable();
+
#ifdef CONFIG_DEBUG_USER
if (((user_debug & UDBG_SEGV) && (sig == SIGSEGV)) ||
((user_debug & UDBG_BUS) && (sig == SIGBUS))) {
pr_err("8<--- cut here ---\n");
pr_err("%s: unhandled page fault (%d) at 0x%08lx, code 0x%03x\n",
--
2.51.0
next prev parent reply other threads:[~2025-11-27 14:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-27 14:01 [RFC PATCH v2 1/2] ARM/mm/fault: always goto bad_area when handling with page faults of kernel address Xie Yuanbin
2025-11-27 14:01 ` Xie Yuanbin [this message]
2025-11-27 14:49 ` [RFC PATCH v2 2/2] ARM/mm/fault: Enable interrupts before sending signal Sebastian Andrzej Siewior
2025-11-27 14:51 ` [RFC PATCH v2 1/2] ARM/mm/fault: always goto bad_area when handling with page faults of kernel address Sebastian Andrzej Siewior
2025-11-28 2:27 ` Xie Yuanbin
2025-11-28 12:03 ` Sebastian Andrzej Siewior
2025-11-28 17:01 ` Russell King (Oracle)
2025-11-28 17:22 ` Sebastian Andrzej Siewior
2025-11-28 17:34 ` Russell King (Oracle)
2025-11-30 11:20 ` Sebastian Andrzej Siewior
2025-11-29 2:33 ` Xie Yuanbin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251127140109.191657-2-xieyuanbin1@huawei.com \
--to=xieyuanbin1@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=bigeasy@linutronix.de \
--cc=brauner@kernel.org \
--cc=david.laight@runbox.com \
--cc=hch@lst.de \
--cc=jack@suse.com \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=liaohua4@huawei.com \
--cc=lilinjie8@huawei.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux@armlinux.org.uk \
--cc=lorenzo.stoakes@oracle.com \
--cc=marc.zyngier@arm.com \
--cc=nico@fluxnic.net \
--cc=pangliyuan1@huawei.com \
--cc=pfalcato@suse.de \
--cc=punitagrawal@gmail.com \
--cc=rjw@rjwysocki.net \
--cc=rmk+kernel@armlinux.org.uk \
--cc=rppt@kernel.org \
--cc=tony@atomide.com \
--cc=vbabka@suse.cz \
--cc=viro@zeniv.linux.org.uk \
--cc=wangkefeng.wang@huawei.com \
--cc=will@kernel.org \
--cc=wozizhi@huaweicloud.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox