diff options
author | Linus Torvalds <torvalds@woody.osdl.org> | 2007-01-04 15:55:26 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2007-01-04 15:55:26 -0500 |
commit | 8be7ed14f4f45e0cd19a70120a1526e1121af4b0 (patch) | |
tree | 6529bad824cecc06639c09b0f33ff5b377bb0c75 /net/ipv4/devinet.c | |
parent | d1398a6ff503a849f3c123bc5f0fdff383a1b6ec (diff) | |
parent | 30c4cf577fb5b68c16e5750d6bdbd7072e42b279 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
[IPV4/IPV6]: Fix inet{,6} device initialization order.
[TCP]: Use old definition of before
[NETFILTER]: ebtables: don't compute gap before checking struct type
[NETFILTER]: nf_nat: fix MASQUERADE crash on device down
[NETFILTER]: New connection tracking is not EXPERIMENTAL anymore
[NETFILTER]: Fix routing of REJECT target generated packets in output chain
[NETFILTER]: compat offsets size change
[SUNGEM]: PHY updates & pause fixes (#2)
[X25]: proper prototype for x25_init_timers()
[AF_NETLINK]: module_put cleanup
[XFRM_USER]: avoid pointless void ** casts
[NETFILTER] xt_hashlimit.c: fix typo
[NET] drivers/net/loopback.c: convert to module_init()
[PKTGEN]: Convert to kthread API.
[NET]: ifb double-counts packets
Diffstat (limited to 'net/ipv4/devinet.c')
-rw-r--r-- | net/ipv4/devinet.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index 84bed40273ad..25c8a42965df 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c | |||
@@ -165,9 +165,8 @@ struct in_device *inetdev_init(struct net_device *dev) | |||
165 | NET_IPV4_NEIGH, "ipv4", NULL, NULL); | 165 | NET_IPV4_NEIGH, "ipv4", NULL, NULL); |
166 | #endif | 166 | #endif |
167 | 167 | ||
168 | /* Account for reference dev->ip_ptr */ | 168 | /* Account for reference dev->ip_ptr (below) */ |
169 | in_dev_hold(in_dev); | 169 | in_dev_hold(in_dev); |
170 | rcu_assign_pointer(dev->ip_ptr, in_dev); | ||
171 | 170 | ||
172 | #ifdef CONFIG_SYSCTL | 171 | #ifdef CONFIG_SYSCTL |
173 | devinet_sysctl_register(in_dev, &in_dev->cnf); | 172 | devinet_sysctl_register(in_dev, &in_dev->cnf); |
@@ -176,6 +175,8 @@ struct in_device *inetdev_init(struct net_device *dev) | |||
176 | if (dev->flags & IFF_UP) | 175 | if (dev->flags & IFF_UP) |
177 | ip_mc_up(in_dev); | 176 | ip_mc_up(in_dev); |
178 | out: | 177 | out: |
178 | /* we can receive as soon as ip_ptr is set -- do this last */ | ||
179 | rcu_assign_pointer(dev->ip_ptr, in_dev); | ||
179 | return in_dev; | 180 | return in_dev; |
180 | out_kfree: | 181 | out_kfree: |
181 | kfree(in_dev); | 182 | kfree(in_dev); |