* [PATCH net-next] ipv4: remove nested rcu_read_lock/unlock
@ 2014-08-01 6:00 Duan Jiong
2014-08-01 19:12 ` Hannes Frederic Sowa
2014-08-02 22:27 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Duan Jiong @ 2014-08-01 6:00 UTC (permalink / raw)
To: David Miller; +Cc: Hannes Frederic Sowa, netdev
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>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] ipv4: remove nested rcu_read_lock/unlock
2014-08-01 6:00 [PATCH net-next] ipv4: remove nested rcu_read_lock/unlock Duan Jiong
@ 2014-08-01 19:12 ` Hannes Frederic Sowa
2014-08-02 22:27 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Hannes Frederic Sowa @ 2014-08-01 19:12 UTC (permalink / raw)
To: Duan Jiong; +Cc: David Miller, netdev
On Fr, 2014-08-01 at 14:00 +0800, Duan Jiong wrote:
> 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>
Cool, thanks!
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] ipv4: remove nested rcu_read_lock/unlock
2014-08-01 6:00 [PATCH net-next] ipv4: remove nested rcu_read_lock/unlock Duan Jiong
2014-08-01 19:12 ` Hannes Frederic Sowa
@ 2014-08-02 22:27 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2014-08-02 22:27 UTC (permalink / raw)
To: duanj.fnst; +Cc: hannes, netdev
From: Duan Jiong <duanj.fnst@cn.fujitsu.com>
Date: Fri, 1 Aug 2014 14:00:36 +0800
>
> 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>
Applied, thank you.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-08-02 22:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-01 6:00 [PATCH net-next] ipv4: remove nested rcu_read_lock/unlock Duan Jiong
2014-08-01 19:12 ` Hannes Frederic Sowa
2014-08-02 22:27 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).