Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ec229e5e81b3cf757e5e8b6a8bd0b4f32fe52f8c
Commit:     ec229e5e81b3cf757e5e8b6a8bd0b4f32fe52f8c
Parent:     9a4c8546f3e7c893888bccc2b3416d6214f2664a
Author:     Pradeep Satyanarayana <[EMAIL PROTECTED]>
AuthorDate: Tue Feb 12 15:00:59 2008 -0800
Committer:  Roland Dreier <[EMAIL PROTECTED]>
CommitDate: Tue Feb 19 10:25:11 2008 -0800

    IPoIB/cm: Fix ipoib_cm_dev_stop() cleanup when drain times out
    
    Commit efcd9971 ("IPoIB/cm: Factor out ipoib_cm_free_rx_reap_list()")
    introduced a bug in ipoib_cm_dev_stop() when the receive drain times
    out.  In that case, the function moves all the pending rx stuff into a
    private list but then calls ipoib_cm_free_rx_reap_list(), which
    handles a different list.
    
    Fix this by moving everything to the rx_reap_list that will actually
    get freed up.
    
    This fixes <https://bugs.openfabrics.org/show_bug.cgi?id=906>.
    
    Signed-off-by: Pradeep Satyanarayana <[EMAIL PROTECTED]>
    Signed-off-by: Roland Dreier <[EMAIL PROTECTED]>
---
 drivers/infiniband/ulp/ipoib/ipoib_cm.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c 
b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
index 7dd2ec4..52b1beb 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
@@ -824,7 +824,6 @@ void ipoib_cm_dev_stop(struct net_device *dev)
        struct ipoib_dev_priv *priv = netdev_priv(dev);
        struct ipoib_cm_rx *p;
        unsigned long begin;
-       LIST_HEAD(list);
        int ret;
 
        if (!IPOIB_CM_SUPPORTED(dev->dev_addr) || !priv->cm.id)
@@ -857,9 +856,12 @@ void ipoib_cm_dev_stop(struct net_device *dev)
                        /*
                         * assume the HW is wedged and just free up everything.
                         */
-                       list_splice_init(&priv->cm.rx_flush_list, &list);
-                       list_splice_init(&priv->cm.rx_error_list, &list);
-                       list_splice_init(&priv->cm.rx_drain_list, &list);
+                       list_splice_init(&priv->cm.rx_flush_list,
+                                        &priv->cm.rx_reap_list);
+                       list_splice_init(&priv->cm.rx_error_list,
+                                        &priv->cm.rx_reap_list);
+                       list_splice_init(&priv->cm.rx_drain_list,
+                                        &priv->cm.rx_reap_list);
                        break;
                }
                spin_unlock_irq(&priv->lock);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to