]> git.ipfire.org Git - thirdparty/linux.git/commit
netfilter: xt_cpu: prefer raw_smp_processor_id
authorFlorian Westphal <fw@strlen.de>
Tue, 19 May 2026 18:10:08 +0000 (20:10 +0200)
committerFlorian Westphal <fw@strlen.de>
Fri, 22 May 2026 10:28:46 +0000 (12:28 +0200)
commitc376f07e16c02239ed44cabb97145d03f65b4d15
tree77d57205264c39e2e74536ac04450363f760437d
parent47980b6dbf83961eec1c1363ea986e9c06ff8054
netfilter: xt_cpu: prefer raw_smp_processor_id

With PREEMPT_RCU we get splat:

BUG: using smp_processor_id() in preemptible [..]
caller is cpu_mt+0x53/0xd0 net/netfilter/xt_cpu.c:37
CPU: 1 .. Comm: syz.3.1377 #0 PREEMPT(full)
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 check_preemption_disabled+0xd3/0xe0 lib/smp_processor_id.c:47
 cpu_mt+0x53/0xd0 net/netfilter/xt_cpu.c:37
 [..]

Just use raw version instead.
This is similar to 14d14a5d2957 ("netfilter: nft_meta: use raw_smp_processor_id()").

Fixes: 0ca743a55991 ("netfilter: nf_tables: add compatibility layer for x_tables")
Reported-by: syzbot+690d3e3ffa7335ac10eb@syzkaller.appspotmail.com
Signed-off-by: Florian Westphal <fw@strlen.de>
net/netfilter/xt_cpu.c