[ofa-general] [PATCH] ipoib: take rtnl_lock when calling ipoib_open directly
Yossi Etigin
yosefe at Voltaire.COM
Wed Mar 25 12:35:47 PDT 2009
ipoib_open() needs to be called with rtnl_lock because it's normally
called by netlink with rtnl_lock taken. Moreover, it calls dev_change_flags()
which needs rtnl_lock.
Signed-off-by: Yossi Etigin <yosefe at voltaire.com>
--
Index: b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
===================================================================
--- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c 2009-03-10 18:21:47.000000000 +0200
+++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c 2009-03-10 19:21:22.000000000 +0200
@@ -1039,8 +1039,11 @@ void ipoib_pkey_poll(struct work_struct
ipoib_pkey_dev_check_presence(dev);
- if (test_bit(IPOIB_PKEY_ASSIGNED, &priv->flags))
+ if (test_bit(IPOIB_PKEY_ASSIGNED, &priv->flags)) {
+ rtnl_lock();
ipoib_open(dev);
+ rtnl_unlock();
+ }
else {
mutex_lock(&pkey_mutex);
if (!test_bit(IPOIB_PKEY_STOP, &priv->flags))
More information about the general
mailing list