From: Jakub Kicinski <kuba@kernel.org>
To: <jhs@mojatatu.com>, <pablo@netfilter.org>
Cc: Vlad Buslov <vladbu@nvidia.com>, <davem@davemloft.net>,
<pabeni@redhat.com>, <edumazet@google.com>,
<netdev@vger.kernel.org>, <louis.peens@corigine.com>,
<yinjun.zhang@corigine.com>, <simon.horman@corigine.com>,
<jiri@resnulli.us>, <xiyou.wangcong@gmail.com>,
Paul Blakey <paulb@nvidia.com>
Subject: Re: [PATCH net] net/sched: act_ct: Take per-cb reference to tcf_ct_flow_table
Date: Fri, 8 Dec 2023 15:40:35 -0800 [thread overview]
Message-ID: <20231208154035.7cbec2f7@kernel.org> (raw)
In-Reply-To: <20231205172554.3570602-1-vladbu@nvidia.com>
On Tue, 5 Dec 2023 18:25:54 +0100 Vlad Buslov wrote:
> The referenced change added custom cleanup code to act_ct to delete any
> callbacks registered on the parent block when deleting the
> tcf_ct_flow_table instance. However, the underlying issue is that the
> drivers don't obtain the reference to the tcf_ct_flow_table instance when
> registering callbacks which means that not only driver callbacks may still
> be on the table when deleting it but also that the driver can still have
> pointers to its internal nf_flowtable and can use it concurrently which
> results either warning in netfilter[0] or use-after-free.
>
> Fix the issue by taking a reference to the underlying struct
> tcf_ct_flow_table instance when registering the callback and release the
> reference when unregistering. Expose new API required for such reference
> counting by adding two new callbacks to nf_flowtable_type and implementing
> them for act_ct flowtable_ct type. This fixes the issue by extending the
> lifetime of nf_flowtable until all users have unregistered.
Some acks would be good here - Pablo, Jamal?
--
pw-bot: needs-ack
next prev parent reply other threads:[~2023-12-08 23:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-05 17:25 [PATCH net] net/sched: act_ct: Take per-cb reference to tcf_ct_flow_table Vlad Buslov
2023-12-06 9:31 ` Louis Peens
2023-12-08 23:40 ` Jakub Kicinski [this message]
2023-12-11 9:30 ` Pablo Neira Ayuso
2023-12-11 10:00 ` patchwork-bot+netdevbpf
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=20231208154035.7cbec2f7@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=louis.peens@corigine.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pablo@netfilter.org \
--cc=paulb@nvidia.com \
--cc=simon.horman@corigine.com \
--cc=vladbu@nvidia.com \
--cc=xiyou.wangcong@gmail.com \
--cc=yinjun.zhang@corigine.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;
as well as URLs for NNTP newsgroup(s).