diff options
-rw-r--r-- | net/ipv4/ip_input.c | 2 | ||||
-rw-r--r-- | net/ipv6/ip6_input.c | 2 |
2 files changed, 0 insertions, 4 deletions
diff --git a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c index 981ff1eef28c..f1395a6fb35f 100644 --- a/net/ipv4/ip_input.c +++ b/net/ipv4/ip_input.c | |||
@@ -325,14 +325,12 @@ static int ip_rcv_finish(struct sk_buff *skb) | |||
325 | const struct net_protocol *ipprot; | 325 | const struct net_protocol *ipprot; |
326 | int protocol = iph->protocol; | 326 | int protocol = iph->protocol; |
327 | 327 | ||
328 | rcu_read_lock(); | ||
329 | ipprot = rcu_dereference(inet_protos[protocol]); | 328 | ipprot = rcu_dereference(inet_protos[protocol]); |
330 | if (ipprot && ipprot->early_demux) { | 329 | if (ipprot && ipprot->early_demux) { |
331 | ipprot->early_demux(skb); | 330 | ipprot->early_demux(skb); |
332 | /* must reload iph, skb->head might have changed */ | 331 | /* must reload iph, skb->head might have changed */ |
333 | iph = ip_hdr(skb); | 332 | iph = ip_hdr(skb); |
334 | } | 333 | } |
335 | rcu_read_unlock(); | ||
336 | } | 334 | } |
337 | 335 | ||
338 | /* | 336 | /* |
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); |