From: Ulrich Weber <ulrich.weber@sophos.com>
To: <netfilter-devel@vger.kernel.org>
Subject: [PATCH net-next] nat: remove obsolete rcu_read_unlock call
Date: Thu, 20 Sep 2012 15:52:04 +0200 [thread overview]
Message-ID: <20120920135133.GA21538@uweber-WS> (raw)
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
next reply other threads:[~2012-09-20 14:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-20 13:52 Ulrich Weber [this message]
2012-09-20 14:14 ` [PATCH net-next] nat: remove obsolete rcu_read_unlock call 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120920135133.GA21538@uweber-WS \
--to=ulrich.weber@sophos.com \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.