Netdev List
 help / color / mirror / Atom feed
From: Xuanqiang Luo <xuanqiang.luo@linux.dev>
To: Ma Xinmeng <1564938642@qq.com>
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>
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	[thread overview]
Message-ID: <6c94d413-02b8-4a1d-8a5f-9503a9ff4815@linux.dev> (raw)
In-Reply-To: <tencent_6731DB02656EFC3D74E4DFCE582B7E0EFC0A@qq.com>

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

  reply	other threads:[~2026-11-18 10:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20261117161520.1031-1-1564938642@qq.com>
2026-11-17 16:14 ` [PATCH nf v2 1/2] netfilter: nf_tables: only disable tables on a dormant transition Ma Xinmeng
2026-11-18 10:11   ` Xuanqiang Luo [this message]
2026-11-17 16:14 ` [PATCH nf v2 2/2] selftests: netfilter: test re-owning an already dormant table Ma Xinmeng
2026-11-17 16:37   ` Florian Westphal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6c94d413-02b8-4a1d-8a5f-9503a9ff4815@linux.dev \
    --to=xuanqiang.luo@linux.dev \
    --cc=1564938642@qq.com \
    --cc=fw@strlen.de \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=phil@nwl.cc \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox