* [PATCH] ipmi: Fix rcu_read_unlock to srcu_read_unlock in handle_read_event_rsp
@ 2026-03-25 12:11 Rui Qi
0 siblings, 0 replies; only message in thread
From: Rui Qi @ 2026-03-25 12:11 UTC (permalink / raw)
To: minyard; +Cc: linux-kernel, openipmi-developer, Rui Qi, stable
Fix a bug where rcu_read_unlock() was used instead of srcu_read_unlock()
in handle_read_event_rsp() when ipmi_alloc_recv_msg() fails.
This mismatch can lead to SRCU read-side critical section imbalance.
Fixes: e86ee2d44b44 ("ipmi: Rework locking and shutdown for hot remove")
Cc: stable@vger.kernel.org # 6.12
Signed-off-by: Rui Qi <qirui.001@bytedance.com>
---
drivers/char/ipmi/ipmi_msghandler.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
index 71c6ec8a87927..d2bbf8ffd9d76 100644
--- a/drivers/char/ipmi/ipmi_msghandler.c
+++ b/drivers/char/ipmi/ipmi_msghandler.c
@@ -4388,7 +4388,7 @@ static int handle_read_event_rsp(struct ipmi_smi *intf,
recv_msg = ipmi_alloc_recv_msg(user);
if (IS_ERR(recv_msg)) {
- rcu_read_unlock();
+ srcu_read_unlock(&intf->users_srcu, index);
list_for_each_entry_safe(recv_msg, recv_msg2, &msgs,
link) {
list_del(&recv_msg->link);
--
2.20.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-03-25 12:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-25 12:11 [PATCH] ipmi: Fix rcu_read_unlock to srcu_read_unlock in handle_read_event_rsp Rui Qi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox