[ofa-general] Re: IPoIB kernel Oops -- possible race condition identified.
Roland Dreier
rdreier at cisco.com
Wed Jan 28 10:53:12 PST 2009
> - priv->mcast_mtu = IPOIB_UD_MTU(ib_mtu_enum_to_int(priv->broadcast->mcmember.mtu));
> + spin_lock_irq(&priv->lock);
> + if (priv->broadcast)
> + priv->mcast_mtu = IPOIB_UD_MTU(ib_mtu_enum_to_int(priv->broadcast->mcmember.mtu));
> + else
> + priv->mcast_mtu = priv->admin_mtu;
Looks reasonable, except what about the code shortly before that in
ipoib_mcast_join_task():
if (!test_bit(IPOIB_MCAST_FLAG_ATTACHED, &priv->broadcast->flags)) {
if (!test_bit(IPOIB_MCAST_FLAG_BUSY, &priv->broadcast->flags))
ipoib_mcast_join(dev, priv->broadcast, 0);
return;
}
is there any reason why that is safe without locking around the using
priv->broadcast? (Fixing that place looks harder, since
ipoib_mcast_join() currently may sleep)
- R.
More information about the general
mailing list