diff options
author | Duan Jiong <duanj.fnst@cn.fujitsu.com> | 2014-08-01 10:00:36 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-08-03 02:27:35 +0400 |
commit | 188b1210f3d633e27dc97309c97315ce484122ec (patch) | |
tree | f3931c6bf20fa3794d1fbc3ae43de5a28bb88a73 /net/ipv4 | |
parent | e339756c9995648eecd015391f66baf2fd251fec (diff) | |
download | linux-188b1210f3d633e27dc97309c97315ce484122ec.tar.xz |
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>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/icmp.c | 2 |
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) raw_icmp_error(skb, protocol, info); - rcu_read_lock(); ipprot = rcu_dereference(inet_protos[protocol]); if (ipprot && ipprot->err_handler) ipprot->err_handler(skb, info); - rcu_read_unlock(); } static bool icmp_tag_validation(int proto) |