[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250509081840.40628-1-lizhijian@fujitsu.com>
Date: Fri, 9 May 2025 16:18:40 +0800
From: Li Zhijian <lizhijian@...itsu.com>
To: jgg@...pe.ca,
leon@...nel.org,
linux-rdma@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
Li Zhijian <lizhijian@...itsu.com>
Subject: [PATCH] IB/cm: Remove redundant WARN_ON in cm_free_priv_msg
Sometimes, the blktests triggered this WARN_ON():
------------[ cut here ]------------
WARNING: CPU: 3 PID: 1330889 at cm.c:353 cm_free_priv_msg+0xaa/0xc0 [ib_cm]
...
CPU: 3 UID: 0 PID: 1330889 Comm: kworker/u16:1 Tainted: G W OE 6.13.0-rc3+ #3
Tainted: [W]=WARN, [O]=OOT_MODULE, [E]=UNSIGNED_MODULE
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014
Workqueue: ib_mad1 timeout_sends [ib_core]
RIP: 0010:cm_free_priv_msg+0xaa/0xc0 [ib_cm]
...
Call Trace:
<TASK>
? cm_free_priv_msg+0xaa/0xc0 [ib_cm]
? __warn.cold+0x93/0xfa
? cm_free_priv_msg+0xaa/0xc0 [ib_cm]
? report_bug+0xff/0x140
? handle_bug+0x58/0x90
? exc_invalid_op+0x17/0x70
? asm_exc_invalid_op+0x1a/0x20
? cm_free_priv_msg+0xaa/0xc0 [ib_cm]
cm_process_send_error+0x64/0x1f0 [ib_cm]
timeout_sends+0x1e5/0x2d0 [ib_core]
process_one_work+0x156/0x310
worker_thread+0x252/0x390
? __pfx_worker_thread+0x10/0x10
kthread+0xd2/0x100
? __pfx_kthread+0x10/0x10
ret_from_fork+0x34/0x50
? __pfx_kthread+0x10/0x10
ret_from_fork_asm+0x1a/0x30
</TASK>
---[ end trace 0000000000000000 ]---
In cm_process_send_error(), cm_free_priv_msg() will be called
when (msg != cm_id_priv->msg) is true. And all other calling to
cm_free_priv_msg() cases, msg is always the same as cm_id_priv->msg.
So it's safe to remove this WARN_ON
Signed-off-by: Li Zhijian <lizhijian@...itsu.com>
---
drivers/infiniband/core/cm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c
index 142170473e75..1a8e5b0e4d85 100644
--- a/drivers/infiniband/core/cm.c
+++ b/drivers/infiniband/core/cm.c
@@ -350,7 +350,7 @@ static void cm_free_priv_msg(struct ib_mad_send_buf *msg)
lockdep_assert_held(&cm_id_priv->lock);
- if (!WARN_ON(cm_id_priv->msg != msg))
+ if (cm_id_priv->msg == msg)
cm_id_priv->msg = NULL;
if (msg->ah)
--
2.44.0
Powered by blists - more mailing lists