[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ea13bc4f8a8aaf5b91ab3ca403533475000d5d87.camel@gmail.com>
Date: Tue, 26 Mar 2024 08:05:37 +0100
From: Nuno Sá <noname.nuno@...il.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>, Herve Codina
<herve.codina@...tlin.com>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>, Rob Herring
<robh+dt@...nel.org>, Frank Rowand <frowand.list@...il.com>, Saravana
Kannan <saravanak@...gle.com>, Lizhi Hou <lizhi.hou@....com>, Max Zhen
<max.zhen@....com>, Sonal Santan <sonal.santan@....com>, Stefano Stabellini
<stefano.stabellini@...inx.com>, Jonathan Cameron
<Jonathan.Cameron@...wei.com>, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org, Allan Nielsen <allan.nielsen@...rochip.com>,
Horatiu Vultur <horatiu.vultur@...rochip.com>, Steen Hegelund
<steen.hegelund@...rochip.com>, Luca Ceresoli <luca.ceresoli@...tlin.com>,
Nuno Sa <nuno.sa@...log.com>, Thomas Petazzoni
<thomas.petazzoni@...tlin.com>, stable@...r.kernel.org
Subject: Re: [PATCH v6 1/2] driver core: Introduce device_link_wait_removal()
On Mon, 2024-03-25 at 19:38 +0100, Greg Kroah-Hartman wrote:
> On Mon, Mar 25, 2024 at 04:21:25PM +0100, Herve Codina wrote:
> > The commit 80dd33cf72d1 ("drivers: base: Fix device link removal")
> > introduces a workqueue to release the consumer and supplier devices used
> > in the devlink.
> > In the job queued, devices are release and in turn, when all the
> > references to these devices are dropped, the release function of the
> > device itself is called.
> >
> > Nothing is present to provide some synchronisation with this workqueue
> > in order to ensure that all ongoing releasing operations are done and
> > so, some other operations can be started safely.
> >
> > For instance, in the following sequence:
> > 1) of_platform_depopulate()
> > 2) of_overlay_remove()
>
> So this is only an issue for overlays? Why has no one noticed this in
> the years since 80dd33cf72d1 was added? Why is this an issue now
> suddenly?
>
Not sure either... Note this is only an issue if device links are in place. So the
overlay needs to have nodes creating those links. You need to have regulators, pwm,
eth phy (at least these ones I'm aware they create links) to trigger this. We would
have to dig through git to understand when would this be noticeable. But note this is
very straight to trigger.
May also very well be that most people don't really "play" with overlay removal...
For example, I have been dealing with overlays on rpi's for the last 5 years and only
noticed this last year when we had an usecase that involved overlay removal.
- Nuno Sá
Powered by blists - more mailing lists