]> git.ipfire.org Git - thirdparty/ipset.git/commitdiff
netfilter: ipset: remove rcu_read_lock_bh pair from ip_set_test
authorFlorian Westphal <fw@strlen.de>
Tue, 6 Jun 2023 11:58:27 +0000 (13:58 +0200)
committerJozsef Kadlecsik <kadlec@netfilter.org>
Mon, 18 Sep 2023 20:34:37 +0000 (22:34 +0200)
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 <kadlec@blackhole.kfki.hu>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Jozsef Kadlecsik <kadlec@netfilter.org>
kernel/net/netfilter/ipset/ip_set_core.c

index 025c1d205084284f54df26961194b6135055eff3..1f5df50165a88f68cc00d1f73c3c7718694d9e2c 100644 (file)
@@ -740,9 +740,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 */