netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] nat: remove obsolete rcu_read_unlock call
@ 2012-09-20 13:52 Ulrich Weber
  2012-09-20 14:14 ` Eric Dumazet
  2012-09-21 10:14 ` Pablo Neira Ayuso
  0 siblings, 2 replies; 8+ messages in thread
From: Ulrich Weber @ 2012-09-20 13:52 UTC (permalink / raw)
  To: netfilter-devel

hlist walk in find_appropriate_src() is not protected anymore by rcu_read_lock(),
so rcu_read_unlock() is unnecessary if in_range() matches.

Signed-off-by: Ulrich Weber <ulrich.weber@sophos.com>
---
 net/netfilter/nf_nat_core.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/net/netfilter/nf_nat_core.c b/net/netfilter/nf_nat_core.c
index 1816ad3..125d832 100644
--- a/net/netfilter/nf_nat_core.c
+++ b/net/netfilter/nf_nat_core.c
@@ -201,10 +201,8 @@ find_appropriate_src(struct net *net, u16 zone,
 				       &ct->tuplehash[IP_CT_DIR_REPLY].tuple);
 			result->dst = tuple->dst;
 
-			if (in_range(l3proto, l4proto, result, range)) {
-				rcu_read_unlock();
+			if (in_range(l3proto, l4proto, result, range))
 				return 1;
-			}
 		}
 	}
 	return 0;
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-09-21 19:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-20 13:52 [PATCH net-next] nat: remove obsolete rcu_read_unlock call Ulrich Weber
2012-09-20 14:14 ` Eric Dumazet
2012-09-20 14:17   ` Ulrich Weber
2012-09-21 10:14     ` Pablo Neira Ayuso
2012-09-20 16:27   ` Stephen Hemminger
2012-09-21 17:08   ` Stephen Hemminger
2012-09-21 19:47     ` Pablo Neira Ayuso
2012-09-21 10:14 ` Pablo Neira Ayuso

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).