diff options
author | Jarek Poplawski <jarkao2@o2.pl> | 2007-01-09 17:38:31 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2007-01-09 17:38:31 -0500 |
commit | 483479ecc565b7f5845997138eddf5ecbc2684b1 (patch) | |
tree | 0760f0ae7f2f0d4b81bc052101d150766104bd6d /net | |
parent | 469de9b90f739f130ab3d483e819888e977596b8 (diff) |
[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>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/devinet.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index 25c8a42965df..480ace9819f6 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c | |||
@@ -174,9 +174,10 @@ struct in_device *inetdev_init(struct net_device *dev) | |||
174 | ip_mc_init_dev(in_dev); | 174 | ip_mc_init_dev(in_dev); |
175 | if (dev->flags & IFF_UP) | 175 | if (dev->flags & IFF_UP) |
176 | ip_mc_up(in_dev); | 176 | ip_mc_up(in_dev); |
177 | out: | 177 | |
178 | /* we can receive as soon as ip_ptr is set -- do this last */ | 178 | /* we can receive as soon as ip_ptr is set -- do this last */ |
179 | rcu_assign_pointer(dev->ip_ptr, in_dev); | 179 | rcu_assign_pointer(dev->ip_ptr, in_dev); |
180 | out: | ||
180 | return in_dev; | 181 | return in_dev; |
181 | out_kfree: | 182 | out_kfree: |
182 | kfree(in_dev); | 183 | kfree(in_dev); |