提交 136251d0 编写于 作者: U Ulrich Weber 提交者: Pablo Neira Ayuso

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 (c7232c99 netfilter: add protocol independent NAT core).
Signed-off-by: NUlrich Weber <ulrich.weber@sophos.com>
Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
上级 b0cdb1d9
...@@ -201,10 +201,8 @@ find_appropriate_src(struct net *net, u16 zone, ...@@ -201,10 +201,8 @@ find_appropriate_src(struct net *net, u16 zone,
&ct->tuplehash[IP_CT_DIR_REPLY].tuple); &ct->tuplehash[IP_CT_DIR_REPLY].tuple);
result->dst = tuple->dst; result->dst = tuple->dst;
if (in_range(l3proto, l4proto, result, range)) { if (in_range(l3proto, l4proto, result, range))
rcu_read_unlock();
return 1; return 1;
}
} }
} }
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册