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 915EE38654F; Sat, 17 Oct 2026 16:22:45 +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=1792254166; cv=none; b=MvJVJ3Rh9STtoOEuC5EsATCQMQ4y8UpF3z1hpz/ZkSNsIlkVnVBlBoYaoX+eyAezkK/ifyI3kosy9N9kdt9piMiw8N8ioYPjxQDpAY4COLM6x/BoV5vAtLocoiPH+XEM1f5+PiykXZHaDJPpyRDSPvM+qjFyilBXUOPv6aVik4A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792254166; c=relaxed/simple; bh=bTz3gqkdUIMQo2iXnSWfvkOXXEcjkyZ9tIItVFxQQA8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bKU9bWe2lVuKEpi2/OCGd1m//befJTMDdpqIttCiuCjGNYQ1iT8Kj5+cBWsmLFv4fqQy9NN7cq8VrlEJbcUfL2p01BH56u3NbWd0bMUKAMFh0oV+rRvGCvD0ILB0/OoY7D4gjWP7wbhKGkX8DjOqrH5Dkt3IPk3O1Qfw1/h5als= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=UUeHWXGm; 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="UUeHWXGm" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AD0491F000C5; Sat, 17 Oct 2026 16:22:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1792254165; bh=BClXT+jFdV4srEGeLxhJ7Z/y8W574+L44CZJZs79AM0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=UUeHWXGm814/TAUc7AogCiFuNnA6i53zn5d12miGexWJo26MV23PhAss77SsYavlk IMegCBXZaUtu7m5joZUJDoCvy+Rs7fhwR2BidqxBncEg6HnTQ30UuQ2m8SuDMP1OG+ qpEpdoMdXxSOETPoyjHB+uRk4EuTPtG7ATnOipMU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Florian Westphal , Pablo Neira Ayuso , Sasha Levin Subject: [PATCH 6.12 357/869] netfilter: bridge: eb_tables: close module init race Date: Sat, 17 Oct 2026 17:53:18 +0200 Message-ID: <20261017160046.259104019@linuxfoundation.org> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261017160036.979869304@linuxfoundation.org> References: <20261017160036.979869304@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.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Florian Westphal [ Upstream commit 27414ff1b287ea9a2a11675149ec28e05539f3cc ] sashiko reports for unrelated patch: Does the core ebtables initialization in ebtables.c suffer from a similar race? Once nf_register_sockopt() completes, the sockopts are exposed globally. sockopt has to be registered last, just like in ip/ip6/arptables. Fixes: 5b53951cfc85 ("netfilter: ebtables: use net_generic infra") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso Signed-off-by: Sasha Levin --- net/bridge/netfilter/ebtables.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c index ab5eca1c9981e..4990a1d0ffb35 100644 --- a/net/bridge/netfilter/ebtables.c +++ b/net/bridge/netfilter/ebtables.c @@ -2607,19 +2607,20 @@ static int __init ebtables_init(void) { int ret; - ret = xt_register_target(&ebt_standard_target); + ret = register_pernet_subsys(&ebt_net_ops); if (ret < 0) return ret; - ret = nf_register_sockopt(&ebt_sockopts); + + ret = xt_register_target(&ebt_standard_target); if (ret < 0) { - xt_unregister_target(&ebt_standard_target); + unregister_pernet_subsys(&ebt_net_ops); return ret; } - ret = register_pernet_subsys(&ebt_net_ops); + ret = nf_register_sockopt(&ebt_sockopts); if (ret < 0) { - nf_unregister_sockopt(&ebt_sockopts); xt_unregister_target(&ebt_standard_target); + unregister_pernet_subsys(&ebt_net_ops); return ret; } -- 2.53.0