[git patch review 2/4] IPoIB: Fix another send-only join race

From: Roland Dreier
Date: Sat Feb 11 2006 - 15:20:59 EST


Further, there's an additional issue that I saw in testing:
ipoib_mcast_send may get called when priv->broadcast is NULL (e.g. if
the device was downed and then upped internally because of a port
event).

If this happends and the send-only join request gets completed before
priv->broadcast is set, we get an oops.

Signed-off-by: Michael S. Tsirkin <mst@xxxxxxxxxxxxxx>
Signed-off-by: Roland Dreier <rolandd@xxxxxxxxx>

---

drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

7bcb974ef6a0ae903888272c92c66ea779388c01
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
index 1c71482..932bf13 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
@@ -701,7 +701,7 @@ void ipoib_mcast_send(struct net_device
*/
spin_lock(&priv->lock);

- if (!test_bit(IPOIB_MCAST_STARTED, &priv->flags)) {
+ if (!test_bit(IPOIB_MCAST_STARTED, &priv->flags) || !priv->broadcast) {
++priv->stats.tx_dropped;
dev_kfree_skb_any(skb);
goto unlock;
--
1.1.3
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/