[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DU0PR04MB94177015BD71516E0E1FEA53881AA@DU0PR04MB9417.eurprd04.prod.outlook.com>
Date: Thu, 17 Aug 2023 01:18:02 +0000
From: Peng Fan <peng.fan@....com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
"Peng Fan (OSS)" <peng.fan@....nxp.com>
CC: "robh+dt@...nel.org" <robh+dt@...nel.org>,
"krzysztof.kozlowski+dt@...aro.org"
<krzysztof.kozlowski+dt@...aro.org>,
"conor+dt@...nel.org" <conor+dt@...nel.org>,
"frowand.list@...il.com" <frowand.list@...il.com>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] of/platform: increase refcount of fwnode
Hi Andy
> Subject: Re: [PATCH] of/platform: increase refcount of fwnode
>
> On Sat, Aug 12, 2023 at 08:24:11PM +0800, Peng Fan (OSS) wrote:
> > From: Peng Fan <peng.fan@....com>
> >
> > commit 0f8e5651095b
> > ("of/platform: Propagate firmware node by calling device_set_node()")
> > use of_fwnode_handle to replace of_node_get, which introduces a side
> > effect that the refcount is not increased. Then the out of tree
> > jailhouse hypervisor enable/disable test will trigger kernel dump in
> > of_overlay_remove, with the following sequence "
> > of_changeset_revert(&overlay_changeset);
> > of_changeset_destroy(&overlay_changeset);
> > of_overlay_remove(&overlay_id);
> > "
> >
> > So increase the refcount to avoid issues.
>
> Right, thank you for the report!
> I was too busy to send myself a fix (I realized about the issue).
> But what I think about this the actual platform code has to be balanced with
> this. I dunno why we have OF code do one part and the platform core do
> the other.
No idea, Rob may comment.
It's not obvious and prone to mistakes (like I made).
>
> Let me look to this closer.
It is 6.5-rc6 now, I hope we could land a fix. If you have better fix, that
would be great.
Thanks,
Peng.
>
> --
> With Best Regards,
> Andy Shevchenko
>
Powered by blists - more mailing lists