Received: from Chamillionaire.breakpoint.cc (Chamillionaire.breakpoint.cc [91.216.245.30]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 29D60328243 for ; Tue, 19 May 2026 18:34:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.216.245.30 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779215679; cv=none; b=WCl4a1y/PJ630ngrdiGfPgjIkh9b8QGxbnKI00WQrwXui4li7aR2Cr+Kzb5JnF7LuBtg0BdMszLYzzp8dsO4ESwZ6uxXD7MU3rL5DJGElDh3K5R+f8nYORaUaHmCVG/VzwXYf9uEo1zn4kZksguhSHTll1yOhtpJjcj2437LjJo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779215679; c=relaxed/simple; bh=gkO8DFGTZebaZIvZk7Eaurzb8SbK1wpn6/IHc1Cw064=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=RboQj4x14IA0OkIQY1Ksk7PVSsd+A0ej/q4WXzC7lvHNEdlAz2bQLD5lzY+Qied/2qnEqz2xrcKWBGTQw65c6HU5FCWHPgrFgbZVhCbRvL6SkJbFtZ1gAqEFgrVQVPvTqWFPzUJ7LZe1ip6YHFVWf6hAsxeEmhSqfAvHLu9Cmc8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=strlen.de; spf=pass smtp.mailfrom=Chamillionaire.breakpoint.cc; arc=none smtp.client-ip=91.216.245.30 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=strlen.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=Chamillionaire.breakpoint.cc Received: by Chamillionaire.breakpoint.cc (Postfix, from userid 1003) id D1B99607BD; Tue, 19 May 2026 20:34:35 +0200 (CEST) From: Florian Westphal To: Cc: Florian Westphal , syzbot+690d3e3ffa7335ac10eb@syzkaller.appspotmail.com Subject: [PATCH nf] netfilter: xt_cpu: prefer raw_smp_processor_id Date: Tue, 19 May 2026 20:34:26 +0200 Message-ID: <20260519183430.20726-1-fw@strlen.de> X-Mailer: git-send-email 2.53.0 Precedence: bulk X-Mailing-List: netfilter-devel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: 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 [..] 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 --- net/netfilter/xt_cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netfilter/xt_cpu.c b/net/netfilter/xt_cpu.c index 3bdc302a0f91..9cb259902a58 100644 --- a/net/netfilter/xt_cpu.c +++ b/net/netfilter/xt_cpu.c @@ -34,7 +34,7 @@ static bool cpu_mt(const struct sk_buff *skb, struct xt_action_param *par) { const struct xt_cpu_info *info = par->matchinfo; - return (info->cpu == smp_processor_id()) ^ info->invert; + return (info->cpu == raw_smp_processor_id()) ^ info->invert; } static struct xt_match cpu_mt_reg __read_mostly = { -- 2.53.0