Thread (5 messages) flat view 5 messages, 2 authors, 1d ago

Re: [PATCH net-next 1/2] netconsole: publish the userdata payload with RCU

From: Breno Leitao <leitao@debian.org>
Date: 2026-08-05 09:56:54
Also in: linux-kselftest, lkml

On Tue, Aug 04, 2026 at 06:09:44PM +0100, Gustavo Luiz Duarte wrote:
quoted
@@ -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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help