🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #18438

Re: [PATCH nf v2 1/2] netfilter: nf_tables: only disable tables on a dormant transition

#18438
From: Xuanqiang Luo
Date: Wed, 18 Nov 2026 10:11
25 lines
9397 bytes
On 2026/11/18 at 1:14 Ma Xinmeng wrote:
> nf_tables_commit() calls nf_tables_table_disable() for every NEWTABLE
> transaction that has NFT_TABLE_F_DORMANT set and __NFT_TABLE_F_UPDATE.
> Since table adoption introduced __NFT_TABLE_F_WAS_ORPHAN, UPDATE no
> longer implies a dormant state change: re-owning an already dormant
> PERSIST orphan sets UPDATE because of the adoption, even though the
> table never left the dormant state. The commit then clears DORMANT,
> walks the basechains, and unregisters a hook that was never registered,
> which triggers WARN_ONCE("hook not found") in
> __nf_unregister_net_hook().
> 
> Use __NFT_TABLE_F_WAS_AWAKEN, which records an awake-to-dormant
> transition, instead of the current DORMANT flag. This skips the disable
> for an already dormant adopted table while preserving the genuine
> awake-to-dormant path.
> 
> Fixes: 31bf508be656 ("netfilter: nf_tables: Implement table adoption support")
> Signed-off-by: Ma Xinmeng <1564938642@qq.com>
The patch looks good to me.

Reviewed-by: Xuanqiang Luo <luoxuanqiang@kylinos.cn>

Thanks,
Xuanqiang
Technical Details
Message-ID: <6c94d413-02b8-4a1d-8a5f-9503a9ff4815@linux.dev>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-366029-linux-kernel-netdev=dewy.ru
References: <20261117161520.1031-1-1564938642@qq.com> <tencent_6731DB02656EFC3D74E4DFCE582B7E0EFC0A@qq.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-366029-linux-kernel-netdev=dewy.ru
From: xuanqiang.luo@linux.dev (Xuanqiang Luo)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH nf v2 1/2] netfilter: nf_tables: only disable tables on a
 dormant transition
Date: Wed, 18 Nov 2026 19:11:26 +0900
Organization: Usenet Network
Message-ID: <6c94d413-02b8-4a1d-8a5f-9503a9ff4815@linux.dev>
References: <20261117161520.1031-1-1564938642@qq.com>
 <tencent_6731DB02656EFC3D74E4DFCE582B7E0EFC0A@qq.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="2564904"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:lyl0kgvrY907F5X6AHQaltnA7uw= sha256:nDnbg9rv/Q6IFPvmYXolnMKrRIbhS8ianjVyz+uvlfU=
	sha1:he4+wSHnyd4vZ4IQtkvUUruf4Mo= sha256:Gap9oH3bnfjxmHbjPhMvXxeRAmZQBCyyVQ3UiKiIMvU=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 4DEDC115242; Wed, 18 Nov 2026 13:11:53 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.051
X-Spam-Status: No, score=-3.051 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key)
	header.d=linux.dev
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id WjjyBlmP0gy7;
	Wed, 18 Nov 2026 13:11:48 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-366029-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=linux.dev
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id CAF2611520B; Wed, 18 Nov 2026 13:11:38 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 15EDB467D4; Wed, 18 Nov 2026 10:11:36 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1794996695;
	b=ev5simZOAZCZOr7HWtDgKSKKdrvCPH0pNPWI+t8jCZWvOfVYMSACxpBK7/lDxI1pixJO
	 a0yo3wp6JHuDJeDqDZDazCcGyF8uM3DeEtVHfWqPgu5hvjw/fKrTaJOUq+S9DWTeQOMK9
	 AlJ9htxr5wXHcBOjN3m2bnff3tXlsYsbHcumXrxGiPCUKXOLBvv0epfLaALYGYm3I7gvb
	 bvLqYccIoba0s4tLQO0e4qDZykRTClTC460B5mWgNxU2bnTDXhNfiyGWg4ydXih5wpya8
	 1TeUxQyE4OXXyxq0UK1xMxvjecoCL71FA+FmPmszA8g7hEmneGR4w++YnfM7XKMEQZA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794996695;
	h=X-Original-To:Received:DMARC-Filter:X-Envelope-To:DKIM-Signature:
	 X-Envelope-To:Received:X-Mizu-Trace-ID:X-Migadu-Flow:Message-ID:Date:
	 X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:User-Agent:
	 Subject:To:Cc:References:From:In-Reply-To:Content-Type:
	 Content-Transfer-Encoding;
	bh=D1MUY1H0VH1qHinNrqNAjg4w0W1AM6O//IjCUC504uI=;
	b=4WstJQv0SV+K/C2DJ1Ty5SlwM25/bMUQehNJIqSfzgYBnE4MIgSJbu/3gZvRYhPsgxgS
	 iiFw+RVkeO+qoNpEvI4NJueo8UaB6iX2RNPEYzqep05qrnN1ngil5vYGL3XLIitsvC+PW
	 sAvwmC9B0Uag5DQwliqhzqb2pFWMT0dziU+kmsHzRZWNwEcXHA+j8EPQus/D8OfOng5vr
	 8X9SsizaP+jf2MXpubFLrknnc7W/P/wP0qmXsjgJ4kt97jw1RHcFgUfB6T/jRMCqNgF1Z
	 SMr35G+1SD3ndtHccuebsJgGgPPS+z0KOtFn9afK8lR5sQBady8UuAMsoWeMi835n6w==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=OW5EI13u;
	dmarc=pass header.from=linux.dev;
	spf=pass smtp.mailfrom=linux.dev;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 7829D606A330;
	Wed, 18 Nov 2026 10:11:35 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=OW5EI13u
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.218.175.125
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1794996694;
	b=I0QzYWaWP4kjJvgYfkgK9qYkkfkBmAlBpzZhNks7p8QtXGPbLFjlywTlVJwIpU7PQrOp
	 3X6BErBFQigXLZ7io5q9N3nEF0c4sUVoJXi9NR/dcN3gUIxSSItFYAHK1B1McUvqhUlHN
	 wraDCqGqOnyoNRZdrr16F7ZybKteWOTUcFyycJOzb2KXQYN/ogJ/GDCtIdvN3TmztxDPG
	 m+mzADkxCmD90J3P58I6esngA4vgUhicjVtp9/jZynTUpToMlX/tnuG/fTDl5uqbRAYIi
	 JRRMXKv6bc4OppuwlODIAq4du0Wrxf3MR2FfqbO5TZEvZf4zxTfgokpjaiwEsGqmfKQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794996694;
	h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received:
	 X-Mizu-Trace-ID:X-Migadu-Flow:Message-ID:Date:MIME-Version:User-Agent:
	 Subject:To:Cc:References:From:In-Reply-To:Content-Type:
	 Content-Transfer-Encoding;
	bh=D1MUY1H0VH1qHinNrqNAjg4w0W1AM6O//IjCUC504uI=;
	b=SfMwNuOsj8DJL5pBGVBey10amJl2SnkxhVBt/vVMaHHKk/ykiRed2duei9V0LJCrbTJA
	 YI0L/khlJWry2lNtPt861f8T5VoXaxMnh4j2ZHOmM49+tht/8sC+R/qfM98ymJfsjBwlK
	 dmZvzcBSCp+9rGZLZYSmSFDj7GK0+5rEJxZlI5BDFVCTdausfj+J6NnCpP2d2+xHsIFjB
	 k7Ae+tISTF5lPiKb/7YSHarufq5D4KeFpggEXfHGdmLiVzHV7mQ9HIaDueU1qCQsxomzR
	 z8krG0J1bconatWRLESsdavKqQAjg+FnP7hKvwWIYLp4fcqd/X73mH71lvB8r+gR5Qg==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=linux.dev;
	spf=pass smtp.mailfrom=linux.dev;
	dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=OW5EI13u;
	arc=none smtp.remote-ip=91.218.175.125
X-Received: from mta0.migadu.com (out-125.mta0.migadu.com [91.218.175.125])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 059FE606A320
	for <netdev@vger.kernel.org>; Wed, 18 Nov 2026 10:11:33 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 059FE606A320
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev
X-Envelope-To: netdev@vger.kernel.org
X-DKIM-Signature: a=rsa-sha256; bh=+bB9g6Bv+semol6SWgegbWp0lH/3VoQYPrulmmDo324=;
 c=simple/simple; d=linux.dev;
 h=from:to:subject:date:message-id:mime-version:content-type; s=key1;
 t=1794996692; v=1; x=1795601492;
 b=OW5EI13uRMfGhs6ixdrLLuvaMP7KYvOoEEPvlEROAbKL1hYGSDT2CH4udseFxC7OBPwu+guP
 WNikBVVefcDsLc2OrtBc6DErGrO5w78T33QBmgpjThOx/ayqYPMVkdUo/13JRDD6T31YSBw7TBR
 J5GzMsPAe/k2v2ehEk0LYZlI=
X-Envelope-To: netdev@vger.kernel.org
X-Received: by smtp.migadu.com with ESMTPS id d58a89dcce9aff1c;
	Wed, 18 Nov 2026 10:11:32 +0000
X-Mizu-Trace-ID: d58a89dcce9aff1c
X-Migadu-Flow: FLOW_OUT
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-User-Agent: Mozilla Thunderbird
X-Cc: netfilter-devel@vger.kernel.org, netdev@vger.kernel.org,
 Phil Sutter <phil@nwl.cc>, Pablo Neira Ayuso <pablo@netfilter.org>,
 Florian Westphal <fw@strlen.de>
X-In-Reply-To: <tencent_6731DB02656EFC3D74E4DFCE582B7E0EFC0A@qq.com>