[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <53DB2D04.6030909@cn.fujitsu.com>
Date: Fri, 1 Aug 2014 14:00:36 +0800
From: Duan Jiong <duanj.fnst@...fujitsu.com>
To: David Miller <davem@...emloft.net>
CC: Hannes Frederic Sowa <hannes@...essinduktion.org>,
netdev <netdev@...r.kernel.org>
Subject: [PATCH net-next] 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@...essinduktion.org>
Signed-off-by: Duan Jiong <duanj.fnst@...fujitsu.com>
---
net/ipv4/icmp.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c
index 092400e..ea7d4af 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)
--
1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists