Skip to content

Commit 27d41d2

Browse files
ferasddledford
authored andcommitted
IB/ipoib: Change list_del to list_del_init in the tx object
Since ipoib_cm_tx_start function and ipoib_cm_tx_reap function belong to different work queues, they can run in parallel. In this case if ipoib_cm_tx_reap calls list_del and release the lock, ipoib_cm_tx_start may acquire it and call list_del_init on the already deleted object. Changing list_del to list_del_init in ipoib_cm_tx_reap fixes the problem. Fixes: 839fcab ("IPoIB: Connected mode experimental support") Signed-off-by: Feras Daoud <[email protected]> Signed-off-by: Erez Shitrit <[email protected]> Reviewed-by: Alex Vesker <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]> Reviewed-by: Yuval Shaia <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
1 parent c586071 commit 27d41d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/infiniband/ulp/ipoib/ipoib_cm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1392,7 +1392,7 @@ static void ipoib_cm_tx_reap(struct work_struct *work)
13921392

13931393
while (!list_empty(&priv->cm.reap_list)) {
13941394
p = list_entry(priv->cm.reap_list.next, typeof(*p), list);
1395-
list_del(&p->list);
1395+
list_del_init(&p->list);
13961396
spin_unlock_irqrestore(&priv->lock, flags);
13971397
netif_tx_unlock_bh(dev);
13981398
ipoib_cm_tx_destroy(p);

0 commit comments

Comments
 (0)