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

Reply via email to