summaryrefslogtreecommitdiffstats
path: root/net/ipv4/devinet.c
diff options
context:
space:
mode:
authorJarek Poplawski <jarkao2@o2.pl>2007-01-09 23:38:31 +0100
committerDavid S. Miller <davem@davemloft.net>2007-01-09 23:38:31 +0100
commit483479ecc565b7f5845997138eddf5ecbc2684b1 (patch)
tree0760f0ae7f2f0d4b81bc052101d150766104bd6d /net/ipv4/devinet.c
parent[INET]: style updates for the inet_sock->is_icsk assignment fix (diff)
downloadlinux-483479ecc565b7f5845997138eddf5ecbc2684b1.tar.xz
linux-483479ecc565b7f5845997138eddf5ecbc2684b1.zip
[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/ipv4/devinet.c')
-rw-r--r--net/ipv4/devinet.c3
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)
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);