[ofa-general] [PATCH v2] ipoib: do not join broadcast group if interface is brought down

Yossi Etigin yosefe at Voltaire.COM
Wed Dec 31 00:18:10 PST 2008


You are right. This is the one place where priv->lock is not held.
I'm sending V3.


Roland Dreier wrote:
>  > @@ -587,8 +589,10 @@ void ipoib_mcast_join_task(struct work_s
>  > 		__ipoib_mcast_add(dev, priv->broadcast);
>  > 		spin_unlock_irq(&priv->lock);
>  > 	}
>  > +	rtnl_unlock();
>  > 
>  > -	if (!test_bit(IPOIB_MCAST_FLAG_ATTACHED, &priv->broadcast->flags)) {
>  > +	if (priv->broadcast &&
>  > +	    !test_bit(IPOIB_MCAST_FLAG_ATTACHED, &priv->broadcast->flags)) {
> 
> I'm trying to understand this patch.  What protects access to
> priv->broadcast here and prevents it from becoming NULL right after the
> test?
> 
>  - R.

-- 
--Yossi



More information about the general mailing list