diff options
author | Ulrich Weber <ulrich.weber@sophos.com> | 2012-09-19 23:52:04 -0400 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-09-21 06:09:25 -0400 |
commit | 136251d02ff283e99f023b0abdeb52b4b3423a56 (patch) | |
tree | 8b65071a9510f6bfe69f6e35e379f6c04a42203f | |
parent | b0cdb1d9a9522b4f0905f11e4c7d7a59e0f7dc44 (diff) |
netfilter: nf_nat: remove obsolete rcu_read_unlock call
hlist walk in find_appropriate_src() is not protected anymore by rcu_read_lock(),
so rcu_read_unlock() is unnecessary if in_range() matches.
This bug was added in (c7232c9 netfilter: add protocol independent NAT core).
Signed-off-by: Ulrich Weber <ulrich.weber@sophos.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r-- | net/netfilter/nf_nat_core.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/netfilter/nf_nat_core.c b/net/netfilter/nf_nat_core.c index 65cf694bb8eb..5f2f9109f461 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, | |||
201 | &ct->tuplehash[IP_CT_DIR_REPLY].tuple); | 201 | &ct->tuplehash[IP_CT_DIR_REPLY].tuple); |
202 | result->dst = tuple->dst; | 202 | result->dst = tuple->dst; |
203 | 203 | ||
204 | if (in_range(l3proto, l4proto, result, range)) { | 204 | if (in_range(l3proto, l4proto, result, range)) |
205 | rcu_read_unlock(); | ||
206 | return 1; | 205 | return 1; |
207 | } | ||
208 | } | 206 | } |
209 | } | 207 | } |
210 | return 0; | 208 | return 0; |