forked from Minki/linux
[IPV4] devinet: inetdev_init out label moved after RCU assignment
inetdev_init out label moved after RCU assignment (final suggestion by Herbert Xu) Signed-off-by: Jarek Poplawski <jarkao2@o2.pl> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
469de9b90f
commit
483479ecc5
@ -174,9 +174,10 @@ struct in_device *inetdev_init(struct net_device *dev)
|
||||
ip_mc_init_dev(in_dev);
|
||||
if (dev->flags & IFF_UP)
|
||||
ip_mc_up(in_dev);
|
||||
out:
|
||||
|
||||
/* we can receive as soon as ip_ptr is set -- do this last */
|
||||
rcu_assign_pointer(dev->ip_ptr, in_dev);
|
||||
out:
|
||||
return in_dev;
|
||||
out_kfree:
|
||||
kfree(in_dev);
|
||||
|
Loading…
Reference in New Issue
Block a user