Skip to content

Commit

Permalink
netfilter: ipset: remove rcu_read_lock_bh pair from ip_set_test
Browse files Browse the repository at this point in the history
Callers already hold rcu_read_lock.

Prior to RCU conversion this used to be a read_lock_bh(), but now the
bh-disable isn't needed anymore.

Cc: Jozsef Kadlecsik <[email protected]>
Signed-off-by: Florian Westphal <[email protected]>
Signed-off-by: Pablo Neira Ayuso <[email protected]>
  • Loading branch information
Florian Westphal authored and ummakynes committed Jun 26, 2023
1 parent de6843b commit 78aa23d
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions net/netfilter/ipset/ip_set_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -739,9 +739,7 @@ ip_set_test(ip_set_id_t index, const struct sk_buff *skb,
!(opt->family == set->family || set->family == NFPROTO_UNSPEC))
return 0;

rcu_read_lock_bh();
ret = set->variant->kadt(set, skb, par, IPSET_TEST, opt);
rcu_read_unlock_bh();

if (ret == -EAGAIN) {
/* Type requests element to be completed */
Expand Down

0 comments on commit 78aa23d

Please sign in to comment.