mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
[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
1 changed files with 2 additions and 1 deletions
|
@ -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 a new issue