From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>
Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
conor+dt@kernel.org, frowand.list@gmail.com,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Peng Fan <peng.fan@nxp.com>
Subject: Re: [PATCH] of/platform: increase refcount of fwnode
Date: Tue, 15 Aug 2023 09:45:18 +0300 [thread overview]
Message-ID: <ZNse/kwnG9WTc9cL@smile.fi.intel.com> (raw)
In-Reply-To: <20230812122411.3410399-1-peng.fan@oss.nxp.com>
On Sat, Aug 12, 2023 at 08:24:11PM +0800, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.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. It's not obvious and prone to mistakes (like I made).
Let me look to this closer.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2023-08-15 6:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-12 12:24 Peng Fan (OSS)
2023-08-15 6:45 ` Andy Shevchenko [this message]
2023-08-17 1:18 ` Peng Fan
2023-08-17 10:57 ` Andy Shevchenko
2023-08-17 11:02 ` Andy Shevchenko
2023-08-17 13:13 ` Peng Fan
2023-08-17 14:06 ` Andy Shevchenko
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=ZNse/kwnG9WTc9cL@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peng.fan@nxp.com \
--cc=peng.fan@oss.nxp.com \
--cc=robh+dt@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
all inboxes | Powered by JetHome®