diff options
-rw-r--r-- | net/ipv4/ip_input.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c index d274078b1665..08a3b121f908 100644 --- a/net/ipv4/ip_input.c +++ b/net/ipv4/ip_input.c | |||
@@ -293,18 +293,16 @@ static inline int ip_rcv_options(struct sk_buff *skb) | |||
293 | } | 293 | } |
294 | 294 | ||
295 | if (unlikely(opt->srr)) { | 295 | if (unlikely(opt->srr)) { |
296 | struct in_device *in_dev = in_dev_get(dev); | 296 | struct in_device *in_dev = __in_dev_get_rcu(dev); |
297 | |||
297 | if (in_dev) { | 298 | if (in_dev) { |
298 | if (!IN_DEV_SOURCE_ROUTE(in_dev)) { | 299 | if (!IN_DEV_SOURCE_ROUTE(in_dev)) { |
299 | if (IN_DEV_LOG_MARTIANS(in_dev) && | 300 | if (IN_DEV_LOG_MARTIANS(in_dev) && |
300 | net_ratelimit()) | 301 | net_ratelimit()) |
301 | printk(KERN_INFO "source route option %pI4 -> %pI4\n", | 302 | printk(KERN_INFO "source route option %pI4 -> %pI4\n", |
302 | &iph->saddr, &iph->daddr); | 303 | &iph->saddr, &iph->daddr); |
303 | in_dev_put(in_dev); | ||
304 | goto drop; | 304 | goto drop; |
305 | } | 305 | } |
306 | |||
307 | in_dev_put(in_dev); | ||
308 | } | 306 | } |
309 | 307 | ||
310 | if (ip_options_rcv_srr(skb)) | 308 | if (ip_options_rcv_srr(skb)) |