From: Florian Westphal <fw@strlen.de>
To: Brian Witte <brianwitte@mailfence.com>
Cc: netfilter-devel@vger.kernel.org, pablo@netfilter.org,
Phil Sutter <phil@nwl.cc>
Subject: Re: [PATCH v5 nf-next 1/3] Revert nf_tables commit_mutex in reset path
Date: Thu, 5 Feb 2026 14:46:26 +0100 [thread overview]
Message-ID: <aYSfMrYl6gmRpn0_@strlen.de> (raw)
In-Reply-To: <20260204202639.497235-2-brianwitte@mailfence.com>
Brian Witte <brianwitte@mailfence.com> wrote:
TL;DR: I plan to queue this series up for the nf tree next week.
Not directly related to this patchset:
[ CC Phil ]
> Revert mutex-based locking for reset requests. It caused a circular
> lock dependency between commit_mutex, nfnl_subsys_ipset, and
> nlk_cb_mutex when nft reset, ipset list, and iptables-nft with set
> match ran concurrently.
>
> This reverts bd662c4218f9, 3d483faa6663, 3cb03edb4de3.
Phil, Pablo, the reset infra is broken in the sense that it cannot
guarantee a correct dump+reset:
nft_rule_for_each_expr(expr, next, rule) {
if (nft_expr_dump(skb, NFTA_LIST_ELEM, expr, reset) < 0)
goto nla_put_failure;
}
nla_nest_end(skb, list);
-> when a single ->dump callback fails because netlink skb is full,
the dump is trimmed and resumed.
But, the reset side effects are already visible.
Hence, while dump may be complete, it can contain already-zeroed
counters without userspace ever getting the pre-reset value.
Maybe we should add a cushion in the relevant dump callbacks to
bail out before calling counter/quota->dump() when we run low on
remaining space? What do you think?
next prev parent reply other threads:[~2026-02-05 13:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-04 20:26 [PATCH v5 nf-next 0/3] netfilter: nf_tables: fix reset request deadlock Brian Witte
2026-02-04 20:26 ` [PATCH v5 nf-next 1/3] Revert nf_tables commit_mutex in reset path Brian Witte
2026-02-05 13:46 ` Florian Westphal [this message]
2026-02-04 20:26 ` [PATCH v5 nf-next 2/3] netfilter: nft_counter: serialize reset with spinlock Brian Witte
2026-02-04 20:26 ` [PATCH v5 nf-next 3/3] netfilter: nft_quota: use atomic64_xchg for reset Brian Witte
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=aYSfMrYl6gmRpn0_@strlen.de \
--to=fw@strlen.de \
--cc=brianwitte@mailfence.com \
--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