[ofa-general] ***SPAM*** [PATCH] ipoib: fix hang while bringing down uninitialized interface

Yossi Etigin yossi.openib at gmail.com
Fri Sep 5 08:00:46 PDT 2008


 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



More information about the general mailing list