PM / Domains: Fix unsafe iteration over modified list of device links
commitb87a32175a22fae2b15750477c1397970deafd68
authorKrzysztof Kozlowski <krzk@kernel.org>
Wed, 28 Jun 2017 14:56:18 +0000 (28 16:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jul 2017 22:07:58 +0000 (27 15:07 -0700)
treedd5a4279f0f8b24f8508d502c49915c923928c05
parent4d94276155f8bbd63b4ff1b3dc3ae9e14c9964e1
PM / Domains: Fix unsafe iteration over modified list of device links

commit c6e83cac3eda5f7dd32ee1453df2f7abb5c6cd46 upstream.

pm_genpd_remove_subdomain() iterates over domain's master_links list and
removes matching element thus it has to use safe version of list
iteration.

Fixes: f721889ff65a ("PM / Domains: Support for generic I/O PM domains (v8)")
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/power/domain.c