summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFernando Fernandez Mancera <fmancera@suse.de>2026-05-22 12:47:17 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2026-06-01 13:43:52 +0200
commitc6c5327dd18bec1e1bbf139b2cf5ae53608a9d30 (patch)
treec8ddf71e6f7c0cfac5829f119a15317eeab089b7
parent78ef59e7a6459b16f8102e0ee1c718443323d1af (diff)
downloadlinux-c6c5327dd18bec1e1bbf139b2cf5ae53608a9d30.tar.gz
linux-c6c5327dd18bec1e1bbf139b2cf5ae53608a9d30.zip
netfilter: xt_NFQUEUE: prefer raw_smp_processor_id
With PREEMPT_RCU this triggers a splat because smp_processor_id() can be preempted while inside a RCU critical section. If xt_NFQUEUE target is invoked via nft_compat_eval() path, we are inside a RCU critical section. Just use the raw version instead. Fixes: 0ca743a55991 ("netfilter: nf_tables: add compatibility layer for x_tables") Signed-off-by: Fernando Fernandez Mancera <fmancera@suse.de> Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--net/netfilter/xt_NFQUEUE.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/xt_NFQUEUE.c b/net/netfilter/xt_NFQUEUE.c
index 466da23e36ff..b32d153e3a18 100644
--- a/net/netfilter/xt_NFQUEUE.c
+++ b/net/netfilter/xt_NFQUEUE.c
@@ -91,7 +91,7 @@ nfqueue_tg_v3(struct sk_buff *skb, const struct xt_action_param *par)
if (info->queues_total > 1) {
if (info->flags & NFQ_FLAG_CPU_FANOUT) {
- int cpu = smp_processor_id();
+ int cpu = raw_smp_processor_id();
queue = info->queuenum + cpu % info->queues_total;
} else {