aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2012-07-29 17:06:13 -0400
committerDavid S. Miller <davem@davemloft.net>2012-07-30 17:53:21 -0400
commitcca32e4bf999a34ac08d959f351f2b30bcd02460 (patch)
tree7456e3d00b57ab353bb726219cec83b8b4d101ab /net/ipv6
parent8bbb181308bc348e02bfdbebdedd4e4ec9d452ce (diff)
net: TCP early demux cleanup
early_demux() handlers should be called in RCU context, and as we use skb_dst_set_noref(skb, dst), caller must not exit from RCU context before dst use (skb_dst(skb)) or release (skb_drop(dst)) Therefore, rcu_read_lock()/rcu_read_unlock() pairs around ->early_demux() are confusing and not needed : Protocol handlers are already in an RCU read lock section. (__netif_receive_skb() does the rcu_read_lock() ) Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/ip6_input.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c
index 47975e363fcd..a52d864d562b 100644
--- a/net/ipv6/ip6_input.c
+++ b/net/ipv6/ip6_input.c
@@ -52,11 +52,9 @@ int ip6_rcv_finish(struct sk_buff *skb)
52 if (sysctl_ip_early_demux && !skb_dst(skb)) { 52 if (sysctl_ip_early_demux && !skb_dst(skb)) {
53 const struct inet6_protocol *ipprot; 53 const struct inet6_protocol *ipprot;
54 54
55 rcu_read_lock();
56 ipprot = rcu_dereference(inet6_protos[ipv6_hdr(skb)->nexthdr]); 55 ipprot = rcu_dereference(inet6_protos[ipv6_hdr(skb)->nexthdr]);
57 if (ipprot && ipprot->early_demux) 56 if (ipprot && ipprot->early_demux)
58 ipprot->early_demux(skb); 57 ipprot->early_demux(skb);
59 rcu_read_unlock();
60 } 58 }
61 if (!skb_dst(skb)) 59 if (!skb_dst(skb))
62 ip6_route_input(skb); 60 ip6_route_input(skb);