aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDuan Jiong <duanj.fnst@cn.fujitsu.com>2014-08-01 02:00:36 -0400
committerDavid S. Miller <davem@davemloft.net>2014-08-02 18:27:35 -0400
commit188b1210f3d633e27dc97309c97315ce484122ec (patch)
treef3931c6bf20fa3794d1fbc3ae43de5a28bb88a73
parente339756c9995648eecd015391f66baf2fd251fec (diff)
ipv4: remove nested rcu_read_lock/unlock
ip_local_deliver_finish() already have a rcu_read_lock/unlock, so the rcu_read_lock/unlock is unnecessary. See the stack below: ip_local_deliver_finish | | ->icmp_rcv | | ->icmp_socket_deliver Suggested-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com> Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/ipv4/icmp.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c
index 092400ef88d0..ea7d4afe8205 100644
--- a/net/ipv4/icmp.c
+++ b/net/ipv4/icmp.c
@@ -670,11 +670,9 @@ static void icmp_socket_deliver(struct sk_buff *skb, u32 info)
670 670
671 raw_icmp_error(skb, protocol, info); 671 raw_icmp_error(skb, protocol, info);
672 672
673 rcu_read_lock();
674 ipprot = rcu_dereference(inet_protos[protocol]); 673 ipprot = rcu_dereference(inet_protos[protocol]);
675 if (ipprot && ipprot->err_handler) 674 if (ipprot && ipprot->err_handler)
676 ipprot->err_handler(skb, info); 675 ipprot->err_handler(skb, info);
677 rcu_read_unlock();
678} 676}
679 677
680static bool icmp_tag_validation(int proto) 678static bool icmp_tag_validation(int proto)