aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorYossi Etigin <yosefe@Voltaire.COM>2009-01-12 22:28:42 -0500
committerRoland Dreier <rolandd@cisco.com>2009-01-12 22:28:42 -0500
commit50df48f59d656d58a1734df5cfe00cdc9a74e8b5 (patch)
treed7f141cea824e428f099b75166e6a60874c1a9ce /drivers/infiniband
parenta50df398cddf6b757bdbf30f5f0875982ef5c660 (diff)
IPoIB: Do not join broadcast group if interface is brought down
Because the ipoib_workqueue is not flushed when ipoib interface is brought down, ipoib_mcast_join() may trigger a join to the broadcast group after priv->broadcast was set to NULL (during cleanup). This will cause the system to be a member of the broadcast group when interface is down. As a side effect, this breaks the optimization of setting the Q_key only when joining the broadcast group. Signed-off-by: Yossi Etigin <yosefe@voltaire.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_multicast.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
index a2eb3b9789eb..59d02e0b8df1 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
@@ -529,6 +529,9 @@ void ipoib_mcast_join_task(struct work_struct *work)
529 if (!priv->broadcast) { 529 if (!priv->broadcast) {
530 struct ipoib_mcast *broadcast; 530 struct ipoib_mcast *broadcast;
531 531
532 if (!test_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags))
533 return;
534
532 broadcast = ipoib_mcast_alloc(dev, 1); 535 broadcast = ipoib_mcast_alloc(dev, 1);
533 if (!broadcast) { 536 if (!broadcast) {
534 ipoib_warn(priv, "failed to allocate broadcast group\n"); 537 ipoib_warn(priv, "failed to allocate broadcast group\n");