Re: [RFC PATCH v3 3/9] software_node: Fix failure to hold refcount in software_node_get_next_child

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 20, 2020 at 12:59 AM Daniel Scally <djrscally@xxxxxxxxx> wrote:
>
> The software_node_get_next_child() function currently does not hold a kref
> to the child software_node; fix that.
>
> Fixes: 59abd83672f7 ("drivers: base: Introducing software nodes to the firmware node framework")
> Signed-off-by: Daniel Scally <djrscally@xxxxxxxxx>
> ---
> Changes in v3:
>         - split out from the full software_node_graph*() patch
>
>  drivers/base/swnode.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/base/swnode.c b/drivers/base/swnode.c
> index f01b1cc61..741149b90 100644
> --- a/drivers/base/swnode.c
> +++ b/drivers/base/swnode.c
> @@ -450,7 +450,7 @@ software_node_get_next_child(const struct fwnode_handle *fwnode,
>                 c = list_next_entry(c, entry);
>         else
>                 c = list_first_entry(&p->children, struct swnode, entry);
> -       return &c->fwnode;
> +       return software_node_get(&c->fwnode);
>  }
>
>  static struct fwnode_handle *
> --

This should be sent as a separate fix AFAICS.



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux