Re: [PATCH V2] PM / Domains: Fix potential deadlock while adding/removing subdomains
From: Ulf Hansson <hidden>
Date: 2016-01-26 14:59:20
On 26 January 2016 at 14:13, Geert Uytterhoeven [off-list ref] wrote:
Hi Rafael, On Sun, Jan 24, 2016 at 2:20 AM, Rafael J. Wysocki [off-list ref] wrote:quoted
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?
Correct, it's the v1. Rafael, if you can't replace the patch I can send an incremental fix on top. Just tell me what way you prefer. Kind regards Uffe