Commit efc9b8e3 authored by Florian Westphal's avatar Florian Westphal Committed by Pablo Neira Ayuso

netfilter: bridge: remove unneeded rcu_read_lock

as comment says, the function is always called with rcu read lock held.
Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent c7a72e3f
...@@ -1016,13 +1016,10 @@ int br_nf_hook_thresh(unsigned int hook, struct net *net, ...@@ -1016,13 +1016,10 @@ int br_nf_hook_thresh(unsigned int hook, struct net *net,
if (!elem) if (!elem)
return okfn(net, sk, skb); return okfn(net, sk, skb);
/* We may already have this, but read-locks nest anyway */
rcu_read_lock();
nf_hook_state_init(&state, hook, NFPROTO_BRIDGE, indev, outdev, nf_hook_state_init(&state, hook, NFPROTO_BRIDGE, indev, outdev,
sk, net, okfn); sk, net, okfn);
ret = nf_hook_slow(skb, &state, elem); ret = nf_hook_slow(skb, &state, elem);
rcu_read_unlock();
if (ret == 1) if (ret == 1)
ret = okfn(net, sk, skb); ret = okfn(net, sk, skb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment