PM / Domains: Fix unsafe iteration over modified list of device links
authorKrzysztof Kozlowski <krzk@kernel.org>
Wed, 28 Jun 2017 14:56:18 +0000 (16:56 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 1 Nov 2017 21:12:43 +0000 (22:12 +0100)
commitc11c8fcaa2e91f3a579fabbc56ef07a11d4db2c0
tree79dcf4f2168eac3519830500a49bdd86e7cdde6c
parentf9c9c73b86b0950f670f5df311fc94910c4cd489
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)")
Cc: 3.1+ <stable@vger.kernel.org> # 3.1+
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: Willy Tarreau <w@1wt.eu>
drivers/base/power/domain.c