[ewg] FW: [PATCH] ipoib: fix hang while bringing down uninitialized interface
Olga Shern
olgas at voltaire.com
Sun Sep 7 09:23:30 PDT 2008
Hi Vlad,
Please add this patch to OFED 1.4
Thanks
Olga
-----Original Message-----
From: Yossi Etigin [mailto:yossi.openib at gmail.com]
Sent: Friday, September 05, 2008 6:01 PM
To: Roland Dreier
Cc: general list; Olga Shern
Subject: [PATCH] ipoib: fix hang while bringing down uninitialized
interface
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 ewg
mailing list