From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 3892C47AF5F; Tue, 16 Jun 2026 18:16:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781633815; cv=none; b=Dda7LmdStC3UbJl3JcbcfvaB7k6XrtZI4Ab1z2CMOZ1JBL0jCFQnv5jt5UlCm0D2QPmnuzsGNCnzp1ZNseFU9/T5qujo7yXeOeIxUJUdVLKhHLuuqhgQmtbM4Tkksa3S/37ClGTg8WmNTE8AinoHw0Sc0rfv29slR9MS+74PoyI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781633815; c=relaxed/simple; bh=/T5fegjlblW69Cx23Pg1gw7rosMwnD43TRjpiwD9/pE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fXkn0rtmbF2fflCbAxSX9AzC9aqd5+jV42pMHC/65Q6Wbn2XGVIZtPpeg3yZPRC+CpB7TgJPQQxjyQEutWY8im2vaoNPcPSiUheJMEI8fEbpAx2H7u2R31TFex2oIEML0ycHjkuno/YaTxy4fqc8ZCuV7EDkfNEfhcCZoF9SbF0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=sO3kLN8T; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="sO3kLN8T" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C05A71F00A3A; Tue, 16 Jun 2026 18:16:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1781633812; bh=SfzWys6qnzmaY1imixRUQfyzLLm376lo8J+gg8wTXmI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=sO3kLN8TJUKEMJbP6aY5BxVCmX03biY7cZQ6LF5O2iA0rQNEZR6U4NbhfuZjpRYLr LBrXCZiSGqkxQdOEbTsYoKRfermlTGHXP5RIFSm6Aztg29/jqEtn47RFe81eN9RvQj raB9NVbfueKO+HdSLtTplw1CphOAruDLfyo43Uxc= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Fernando Fernandez Mancera , Florian Westphal , Pablo Neira Ayuso , Sasha Levin Subject: [PATCH 5.15 150/411] netfilter: xt_NFQUEUE: prefer raw_smp_processor_id Date: Tue, 16 Jun 2026 20:26:28 +0530 Message-ID: <20260616145108.390049001@linuxfoundation.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260616145100.376842714@linuxfoundation.org> References: <20260616145100.376842714@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Fernando Fernandez Mancera [ Upstream commit c6c5327dd18bec1e1bbf139b2cf5ae53608a9d30 ] 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 Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso Signed-off-by: Sasha Levin --- net/netfilter/xt_NFQUEUE.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netfilter/xt_NFQUEUE.c b/net/netfilter/xt_NFQUEUE.c index 466da23e36ff47..b32d153e3a1862 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 { -- 2.53.0