diff options
Diffstat (limited to 'net/ipv4/devinet.c')
-rw-r--r-- | net/ipv4/devinet.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index 56fce3ab6c55..0bff576d2918 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c | |||
@@ -112,13 +112,7 @@ static inline void devinet_sysctl_unregister(struct in_device *idev) | |||
112 | 112 | ||
113 | static struct in_ifaddr *inet_alloc_ifa(void) | 113 | static struct in_ifaddr *inet_alloc_ifa(void) |
114 | { | 114 | { |
115 | struct in_ifaddr *ifa = kzalloc(sizeof(*ifa), GFP_KERNEL); | 115 | return kzalloc(sizeof(struct in_ifaddr), GFP_KERNEL); |
116 | |||
117 | if (ifa) { | ||
118 | INIT_RCU_HEAD(&ifa->rcu_head); | ||
119 | } | ||
120 | |||
121 | return ifa; | ||
122 | } | 116 | } |
123 | 117 | ||
124 | static void inet_rcu_free_ifa(struct rcu_head *head) | 118 | static void inet_rcu_free_ifa(struct rcu_head *head) |
@@ -161,7 +155,6 @@ static struct in_device *inetdev_init(struct net_device *dev) | |||
161 | in_dev = kzalloc(sizeof(*in_dev), GFP_KERNEL); | 155 | in_dev = kzalloc(sizeof(*in_dev), GFP_KERNEL); |
162 | if (!in_dev) | 156 | if (!in_dev) |
163 | goto out; | 157 | goto out; |
164 | INIT_RCU_HEAD(&in_dev->rcu_head); | ||
165 | memcpy(&in_dev->cnf, dev_net(dev)->ipv4.devconf_dflt, | 158 | memcpy(&in_dev->cnf, dev_net(dev)->ipv4.devconf_dflt, |
166 | sizeof(in_dev->cnf)); | 159 | sizeof(in_dev->cnf)); |
167 | in_dev->cnf.sysctl = NULL; | 160 | in_dev->cnf.sysctl = NULL; |