From: Minxi Hou <houminxi@gmail.com>
To: netdev@vger.kernel.org
Cc: Aaron Conole <aconole@redhat.com>,
Eelco Chaudron <echaudro@redhat.com>,
Ilya Maximets <i.maximets@ovn.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>, Paul Blakey <paulb@nvidia.com>,
Jamal Hadi Salim <jhs@mojatatu.com>,
dev@openvswitch.org
Subject: Re: [PATCH net v2 1/2] net: openvswitch: do not record user features when the change fails
Date: Tue, 10 Nov 2026 12:51:11 -0500 [thread overview]
Message-ID: <20261110175111.977451-1-houminxi@gmail.com> (raw)
In-Reply-To: <179423057882.994134.14676780013911062883@kernel.org>
On 2026-11-09 08:23, Sashiko wrote:
> [Low] Is this list of reference holders accurate? Only cls_flower and
> openvswitch call tc_skb_ext_tc_enable() and tc_skb_ext_tc_disable().
Correct, and v3 says it that way: cls_flower and OVS take and drop
references, and the bridge, the flow dissector and the OVS flow path only
read the key and depend on it staying on while they do.
> [High] Can every failed OVS_DP_CMD_NEW leak one tc_skb_ext_tc reference?
> [High] ovs_dp_reset_user_features() has the same gap.
> Would it make sense to add a tc_skb_ext_tc_disable() to the
> ovs_dp_cmd_new() error path and to ovs_dp_reset_user_features()?
Both are real, and v3 fixes them along with the one the series started
with. All the paths that change or clear the bit now go through
ovs_dp_set_user_features(), which takes or drops the reference as it
records the field, so the four places that write it can no longer
disagree with the count. The failing NEW is the datapath that never
reaches __dp_destroy(), and the reset runs ahead of it for the name that
already exists.
The two tests cover the reset path: an outdated client sends NEW for a
datapath that exists, and the test checks that the datapath keeps
answering sets afterwards.
pw-bot: cr
next prev parent reply other threads:[~2026-11-10 17:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-08 12:34 [PATCH net v2 0/2] net: openvswitch: fix a feature leak on a failed change Minxi Hou
2026-11-08 12:34 ` [PATCH net v2 1/2] net: openvswitch: do not record user features when the change fails Minxi Hou
2026-11-09 13:22 ` netdev-bot+sashiko
2026-11-10 17:51 ` Minxi Hou [this message]
2026-11-08 12:34 ` [PATCH net v2 2/2] selftests/net/openvswitch: check that a failed set keeps the features Minxi Hou
2026-11-09 13:23 ` netdev-bot+sashiko
2026-11-10 17:51 ` Minxi Hou
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=20261110175111.977451-1-houminxi@gmail.com \
--to=houminxi@gmail.com \
--cc=aconole@redhat.com \
--cc=dev@openvswitch.org \
--cc=echaudro@redhat.com \
--cc=horms@kernel.org \
--cc=i.maximets@ovn.org \
--cc=jhs@mojatatu.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=paulb@nvidia.com \
/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