Skip to content

Commit

Permalink
IPoIB: Fix AH leak at interface down
Browse files Browse the repository at this point in the history
When ipoib_stop() is called it first calls netif_stop_queue() to stop
the kernel from passing more packets to the network driver. However,
the completion handler may call netif_wake_queue() re-enabling packet
transfer.

This might result in leaks (we see AH leaks which we think can be
attributed to this bug) as new packets get posted while the interface
is going down.

Signed-off-by: Eli Cohen <[email protected]>
Signed-off-by: Michael Tsirkin <[email protected]>
Signed-off-by: Roland Dreier <[email protected]>
  • Loading branch information
Eli Cohen authored and Roland Dreier committed Jun 5, 2006
1 parent 672c610 commit 959eb39
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/infiniband/ulp/ipoib/ipoib_ib.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ static void ipoib_ib_handle_wc(struct net_device *dev,
spin_lock_irqsave(&priv->tx_lock, flags);
++priv->tx_tail;
if (netif_queue_stopped(dev) &&
test_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags) &&
priv->tx_head - priv->tx_tail <= ipoib_sendq_size >> 1)
netif_wake_queue(dev);
spin_unlock_irqrestore(&priv->tx_lock, flags);
Expand Down

0 comments on commit 959eb39

Please sign in to comment.