Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Yossi Etigin and committed by
Roland Dreier
50df48f5 a50df398

+3
+3
drivers/infiniband/ulp/ipoib/ipoib_multicast.c
··· 529 529 if (!priv->broadcast) { 530 530 struct ipoib_mcast *broadcast; 531 531 532 + if (!test_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags)) 533 + return; 534 + 532 535 broadcast = ipoib_mcast_alloc(dev, 1); 533 536 if (!broadcast) { 534 537 ipoib_warn(priv, "failed to allocate broadcast group\n");