projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ed7865a
)
net: avoid two atomic ops in ip_rcv_options()
author
Eric Dumazet
<
[email protected]
>
Mon, 7 Jun 2010 03:54:46 +0000
(
03:54
+0000)
committer
David S. Miller
<
[email protected]
>
Tue, 8 Jun 2010 04:49:51 +0000
(21:49 -0700)
in_dev_get() -> __in_dev_get_rcu() in a rcu protected function.
Signed-off-by: Eric Dumazet <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/ipv4/ip_input.c
patch
|
blob
|
history
diff --git
a/net/ipv4/ip_input.c
b/net/ipv4/ip_input.c
index d274078b16650009248d3971077c1b3f8bf28f2b..08a3b121f908dc5367f7593c6560bb346b868fdb 100644
(file)
--- 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)
}
if (unlikely(opt->srr)) {
- struct in_device *in_dev = in_dev_get(dev);
+ struct in_device *in_dev = __in_dev_get_rcu(dev);
+
if (in_dev) {
if (!IN_DEV_SOURCE_ROUTE(in_dev)) {
if (IN_DEV_LOG_MARTIANS(in_dev) &&
net_ratelimit())
printk(KERN_INFO "source route option %pI4 -> %pI4\n",
&iph->saddr, &iph->daddr);
- in_dev_put(in_dev);
goto drop;
}
-
- in_dev_put(in_dev);
}
if (ip_options_rcv_srr(skb))