diff options
author | Eli Cohen <eli@mellanox.co.il> | 2008-07-14 23:48:51 -0700 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-07-14 23:48:51 -0700 |
commit | c8c2afe360b7366f586f6bece1109a72ea334876 (patch) | |
tree | c132fc0580deebde3dc49c59bac9c4a559aef192 /drivers/infiniband/ulp/ipoib/ipoib_multicast.c | |
parent | 9eae554c171e086c89ab83da2a2d3c8bf958fcb5 (diff) |
IPoIB: Use rtnl lock/unlock when changing device flags
Use of this lock is required to synchronize changes to the netdvice's
data structs. Also move the call to ipoib_flush_paths() after the
modification of the netdevice flags in set_mode().
Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/ulp/ipoib/ipoib_multicast.c')
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c index 71add7a8d53..be1ed38cdcf 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c @@ -575,8 +575,11 @@ void ipoib_mcast_join_task(struct work_struct *work) priv->mcast_mtu = IPOIB_UD_MTU(ib_mtu_enum_to_int(priv->broadcast->mcmember.mtu)); - if (!ipoib_cm_admin_enabled(dev)) + if (!ipoib_cm_admin_enabled(dev)) { + rtnl_lock(); dev->mtu = min(priv->mcast_mtu, priv->admin_mtu); + rtnl_unlock(); + } ipoib_dbg_mcast(priv, "successfully joined all multicast groups\n"); |