Skip to content

Commit 7590649

Browse files
vladumrleon
authored andcommitted
IB/cm: Drop lockdep assert and WARN when freeing old msg
The send completion handler can run after cm_id has advanced to another message. The cm_id lock is not needed in this case, but a recent change re-used cm_free_priv_msg(), which asserts that the lock is held and WARNs if the cm_id's currently outstanding msg is different than the one being freed. Fixes: 1e51592 ("IB/cm: Do not hold reference on cm_id unless needed") Signed-off-by: Vlad Dumitrescu <[email protected]> Reviewed-by: Sean Hefty <[email protected]> Link: https://patch.msgid.link/0c364c29142f72b7875fdeba51f3c9bd6ca863ee.1745839788.git.leon@kernel.org Signed-off-by: Leon Romanovsky <[email protected]>
1 parent 3db60cf commit 7590649

File tree

1 file changed

+2
-1
lines changed
  • drivers/infiniband/core

1 file changed

+2
-1
lines changed

drivers/infiniband/core/cm.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3786,7 +3786,8 @@ static void cm_process_send_error(struct cm_id_private *cm_id_priv,
37863786
spin_lock_irq(&cm_id_priv->lock);
37873787
if (msg != cm_id_priv->msg) {
37883788
spin_unlock_irq(&cm_id_priv->lock);
3789-
cm_free_priv_msg(msg);
3789+
cm_free_msg(msg);
3790+
cm_deref_id(cm_id_priv);
37903791
return;
37913792
}
37923793
cm_free_priv_msg(msg);

0 commit comments

Comments
 (0)