From: Breno Leitao <leitao@debian.org>
To: Gustavo Luiz Duarte <gustavold@gmail.com>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>, Shuah Khan <shuah@kernel.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org, asantostc@gmail.com,
kernel-team@meta.com
Subject: Re: [PATCH net-next 1/2] netconsole: publish the userdata payload with RCU
Date: Wed, 5 Aug 2026 02:56:30 -0700 [thread overview]
Message-ID: <anMInvnYk9fafp_Y@gmail.com> (raw)
In-Reply-To: <CAGSyskVKAwf8nb_3uFDbYUugR+dtO-cwSef8C9nSEgKZt_K=CQ@mail.gmail.com>
On Tue, Aug 04, 2026 at 06:09:44PM +0100, Gustavo Luiz Duarte wrote:
> > @@ -176,8 +190,7 @@ struct netconsole_target {
> > #ifdef CONFIG_NETCONSOLE_DYNAMIC
> > struct config_group group;
> > struct config_group userdata_group;
> > - char *userdata;
> > - size_t userdata_length;
> > + struct netcons_userdata __rcu *userdata;
>
> With userdata now annotated with __rcu, it should be freed with
> kfree(rcu_access_pointer(nt->userdata)) to avoid a sparse warning:
Good catch, thanks. I will fix in v2 in both netconsole_target_release()
and free_param_target().
I willthe plain kfree() instead of kfree_rcu(): both callers free nt
itself on the next line, and the target is already unlinked from
target_list at that point, so the payload cannot outlive the target.
Thanks for the review,
--breno
next prev parent reply other threads:[~2026-08-05 9:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-03 11:30 [PATCH net-next 0/2] netconsole: replace target_list_lock by RCU on userdata hot path Breno Leitao
2026-08-03 11:30 ` [PATCH net-next 1/2] netconsole: publish the userdata payload with RCU Breno Leitao
2026-08-04 17:09 ` Gustavo Luiz Duarte
2026-08-05 9:56 ` Breno Leitao [this message]
2026-08-03 11:30 ` [PATCH net-next 2/2] selftests: netconsole: add a userdata torture test Breno Leitao
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=anMInvnYk9fafp_Y@gmail.com \
--to=leitao@debian.org \
--cc=andrew+netdev@lunn.ch \
--cc=asantostc@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gustavold@gmail.com \
--cc=kernel-team@meta.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.org \
/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