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 2A450361651; Tue, 16 Jun 2026 15:45:41 +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=1781624743; cv=none; b=IPLHOXh2u6HrX7wJ5Fi6X1rYIH5IzmvW0l1wBEsHU7WKPvcFFtI+FIbgTaB7n566314zzotNAgT5g1/flVxKkwQtFg3I8wpokH4Q+Rt1YEP54KArbPcNhdhn91+C+r0aOo24INNJEzJA/fQrQ4cj52n+1oVltUy+iG48gZf0Bug= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781624743; c=relaxed/simple; bh=FIaTrvYL6E3x9JP22WTM0lYu6kyGZcfp/G7W6ySmlrA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=a/Jtz8VQy402ZETYzhYlZAHWUVAqiJ5+9GnZnKYFYWvnd0pR0nVbkEu+i032YrOldxvjdxs+cWVb0HY9PECVKtyVpROUFaDlzo66e0SUMHopS0POej6t3CSiVj4vLGAkPlVHbAgQjJYJh4sqajSS9GPQYIBRzIdx0fIh602vFgA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=FrOX6zjq; 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="FrOX6zjq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 02CA31F000E9; Tue, 16 Jun 2026 15:45:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1781624740; bh=DJ/JJngHQP7CiRVkzqBaqkfH5PAEk/EylES5fcDvmww=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=FrOX6zjqT1hvFjKWhuuGZ3Pkhx0jLMvLb9titzAwjI0ExUxICMXZfM1ClMRts1Een AlWBNe0JC152k0MMARYRScnvEiD9sTjK4etAKSsKAPu4LO5mE8HWAWc2Zl9e2n323J kTA+iCJEpRvU86/lHJjG57ZaHsbp9D2tqTYk4V3g= 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 6.18 021/325] netfilter: xt_NFQUEUE: prefer raw_smp_processor_id Date: Tue, 16 Jun 2026 20:26:57 +0530 Message-ID: <20260616145058.842061688@linuxfoundation.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260616145057.827196531@linuxfoundation.org> References: <20260616145057.827196531@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 6.18-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