***SPAM*** Fwd: [ofa-general] [PATCH] ipoib: fix hang while bringing down uninitialized interface
Yossi Etigin
yossi.openib at gmail.com
Wed Sep 10 07:32:27 PDT 2008
Roland,
Can you comment on this?
It fixes a soft lockup during ipoib stop.
-------- Original Message --------
Subject: [ofa-general] ***SPAM*** [PATCH] ipoib: fix hang while bringing down uninitialized interface
Date: Fri, 05 Sep 2008 18:00:46 +0300
From: Yossi Etigin <yossi.openib at gmail.com>
To: Roland Dreier <rdreier at cisco.com>
CC: Olga Shern <olgas at voltaire.com>, general list <general at lists.openfabrics.org>
Fix bug #1172: If a pkey for an interface is not found during
initialization, then poll_timer is left uninitialized. When the
device is brought down, ipoib tries to del_timer_sync() it. This
call hangs in an infinite loop in lock_timer_base(), because
timer_base is NULL. We should check whether the timer was really
initialized.
Signed-off-by: Yossi Etigin <yosefe at voltaire.com>
--
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
index 66cafa2..3bbf46d 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
@@ -850,7 +850,10 @@ int ipoib_ib_dev_stop(struct net_device *dev, int flush)
ipoib_dbg(priv, "All sends and receives done.\n");
timeout:
- del_timer_sync(&priv->poll_timer);
+ /* Make sure the timer is initialized */
+ if (priv->poll_timer.function)
+ del_timer_sync(&priv->poll_timer);
+
qp_attr.qp_state = IB_QPS_RESET;
if (ib_modify_qp(priv->qp, &qp_attr, IB_QP_STATE))
ipoib_warn(priv, "Failed to modify QP to RESET state\n");
--Yossi
_______________________________________________
general mailing list
general at lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
More information about the general
mailing list