Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 45222
b: refs/heads/master
c: 30c4cf5
h: refs/heads/master
v: v3
  • Loading branch information
David L Stevens authored and David S. Miller committed Jan 4, 2007
1 parent 50ea4ac commit 640d14a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0d630cc0a6cb8ad544b5913a26ff1349ed7c8587
refs/heads/master: 30c4cf577fb5b68c16e5750d6bdbd7072e42b279
5 changes: 3 additions & 2 deletions trunk/net/ipv4/devinet.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,8 @@ struct in_device *inetdev_init(struct net_device *dev)
NET_IPV4_NEIGH, "ipv4", NULL, NULL);
#endif

/* Account for reference dev->ip_ptr */
/* Account for reference dev->ip_ptr (below) */
in_dev_hold(in_dev);
rcu_assign_pointer(dev->ip_ptr, in_dev);

#ifdef CONFIG_SYSCTL
devinet_sysctl_register(in_dev, &in_dev->cnf);
Expand All @@ -176,6 +175,8 @@ struct in_device *inetdev_init(struct net_device *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);
return in_dev;
out_kfree:
kfree(in_dev);
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/ipv6/addrconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,6 @@ static struct inet6_dev * ipv6_add_dev(struct net_device *dev)
if (netif_carrier_ok(dev))
ndev->if_flags |= IF_READY;

/* protected by rtnl_lock */
rcu_assign_pointer(dev->ip6_ptr, ndev);

ipv6_mc_init_dev(ndev);
ndev->tstamp = jiffies;
Expand All @@ -425,6 +423,8 @@ static struct inet6_dev * ipv6_add_dev(struct net_device *dev)
NULL);
addrconf_sysctl_register(ndev, &ndev->cnf);
#endif
/* protected by rtnl_lock */
rcu_assign_pointer(dev->ip6_ptr, ndev);
return ndev;
}

Expand Down

0 comments on commit 640d14a

Please sign in to comment.