YOSHIFUJI Hideaki / ???? <[EMAIL PROTECTED]> wrote: > > @@ -2291,10 +2287,9 @@ static int addrconf_ifdown(struct net_de > Do not dev_put! > */ > if (how == 1) { > - write_lock_bh(&addrconf_lock); > - dev->ip6_ptr = NULL; > - idev->dead = 1; > - write_unlock_bh(&addrconf_lock); > + set_wmb(idev->dead, 1); > + /* protected by rtnl_lock */ > + rcu_assign_pointer(dev->ip6_ptr, NULL);
A pet peeve of mine: As a general rule you do not need to use rcu_assign_pointer when clearing an RCU pointer. The whole point of that construct is to place a barrier between initialising an object and assigning the address of that object to the pointer. Since the object pointed to by NULL requires no initialisation, you don't need the barrier. I'd also like to know the purpose of the wmb after idev->dead = 1. Thanks, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html