[ewg] [PATCH] ipoib: avoid enabling napi when it's already enabled
Yossi Etigin
yosefe at Voltaire.COM
Mon Oct 27 09:36:00 PDT 2008
ipoib_open() may be called from ipoib_pkey_poll(), after napi has already been
enbaled, and try to enable it again. This triggers BUG_ON test in napi_enable().
Signed-off-by: Yossi Etigin <yosefe at voltaire.com>
Index: b/drivers/infiniband/ulp/ipoib/ipoib_main.c
===================================================================
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c 2008-10-19 16:22:09.000000000 +0200
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c 2008-10-23 20:22:20.000000000 +0200
@@ -106,12 +106,13 @@ int ipoib_open(struct net_device *dev)
ipoib_dbg(priv, "bringing up interface\n");
- napi_enable(&priv->napi);
set_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags);
if (ipoib_pkey_dev_delay_open(dev))
return 0;
+ napi_enable(&priv->napi);
+
if (ipoib_ib_dev_open(dev)) {
napi_disable(&priv->napi);
return -EINVAL;
--
--Yossi
More information about the ewg
mailing list