mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-10 07:00:48 +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
@ -174,9 +174,10 @@ struct in_device *inetdev_init(struct net_device *dev)
|
|||||||
ip_mc_init_dev(in_dev);
|
ip_mc_init_dev(in_dev);
|
||||||
if (dev->flags & IFF_UP)
|
if (dev->flags & IFF_UP)
|
||||||
ip_mc_up(in_dev);
|
ip_mc_up(in_dev);
|
||||||
out:
|
|
||||||
/* we can receive as soon as ip_ptr is set -- do this last */
|
/* we can receive as soon as ip_ptr is set -- do this last */
|
||||||
rcu_assign_pointer(dev->ip_ptr, in_dev);
|
rcu_assign_pointer(dev->ip_ptr, in_dev);
|
||||||
|
out:
|
||||||
return in_dev;
|
return in_dev;
|
||||||
out_kfree:
|
out_kfree:
|
||||||
kfree(in_dev);
|
kfree(in_dev);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user