aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorPradeep Satyanarayana <pradeeps@linux.vnet.ibm.com>2008-02-12 18:00:59 -0500
committerRoland Dreier <rolandd@cisco.com>2008-02-19 13:25:11 -0500
commitec229e5e81b3cf757e5e8b6a8bd0b4f32fe52f8c (patch)
tree0a257aa06672c5212110390baafc09752f4ca425 /drivers/infiniband
parent9a4c8546f3e7c893888bccc2b3416d6214f2664a (diff)
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 <pradeeps@linux.vnet.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_cm.c10
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 7dd2ec473d24..52b1bebfa744 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)
824 struct ipoib_dev_priv *priv = netdev_priv(dev); 824 struct ipoib_dev_priv *priv = netdev_priv(dev);
825 struct ipoib_cm_rx *p; 825 struct ipoib_cm_rx *p;
826 unsigned long begin; 826 unsigned long begin;
827 LIST_HEAD(list);
828 int ret; 827 int ret;
829 828
830 if (!IPOIB_CM_SUPPORTED(dev->dev_addr) || !priv->cm.id) 829 if (!IPOIB_CM_SUPPORTED(dev->dev_addr) || !priv->cm.id)
@@ -857,9 +856,12 @@ void ipoib_cm_dev_stop(struct net_device *dev)
857 /* 856 /*
858 * assume the HW is wedged and just free up everything. 857 * assume the HW is wedged and just free up everything.
859 */ 858 */
860 list_splice_init(&priv->cm.rx_flush_list, &list); 859 list_splice_init(&priv->cm.rx_flush_list,
861 list_splice_init(&priv->cm.rx_error_list, &list); 860 &priv->cm.rx_reap_list);
862 list_splice_init(&priv->cm.rx_drain_list, &list); 861 list_splice_init(&priv->cm.rx_error_list,
862 &priv->cm.rx_reap_list);
863 list_splice_init(&priv->cm.rx_drain_list,
864 &priv->cm.rx_reap_list);
863 break; 865 break;
864 } 866 }
865 spin_unlock_irq(&priv->lock); 867 spin_unlock_irq(&priv->lock);