Thread (5 messages) 5 messages, 3 authors, 2016-01-26

Re: [PATCH V2] PM / Domains: Fix potential deadlock while adding/removing subdomains

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2016-01-26 13:13:53

Hi Rafael,

On Sun, Jan 24, 2016 at 2:20 AM, Rafael J. Wysocki [off-list ref] wrote:
On Wednesday, January 20, 2016 12:07:39 PM Ulf Hansson wrote:
quoted
We must preserve the same order of how we acquire and release the lock for
genpd, as otherwise we may encounter deadlocks.

The power on phase of a genpd starts by acquiring its lock. Then it walks
the hierarchy of its parent domains to be able to power on these first, as
per design of genpd.

From a locking perspective this means the locks of the parents becomes
acquired after the lock of the subdomain.

Let's fix pm_genpd_add|remove_subdomain() to maintain the same order of
acquiring/releasing the genpd lock as being applied in the power on/off
sequence.

Signed-off-by: Ulf Hansson <redacted>
Applied, thanks!
It looks like you accidentally applied v1, introducing the lockdep warnings
fixed in v2?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help