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

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

From: Rafael J. Wysocki <hidden>
Date: 2016-01-24 01:19:14

On Wednesday, January 20, 2016 12:07:39 PM Ulf Hansson wrote:
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!

Rafael
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help