Patch "PM / Domains: Fix unsafe iteration over modified list of device links" has been added to the 3.18-stable tree
Subsystems (5)
This is a note to let you know that I've just added the patch titled
PM / Domains: Fix unsafe iteration over modified list of device links
to the 3.18-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
pm-domains-fix-unsafe-iteration-over-modified-list-of-device-links.patch
and it can be found in the queue-3.18 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
c6e83cac3eda5f7dd32ee1453df2f7abb5c6cd46Mon Sep 17 00:00:00 2001
From: Krzysztof Kozlowski <[email protected]>
Date: Wed, 28 Jun 2017 16:56:18 +0200
Subject: PM / Domains: Fix unsafe iteration over modified list of device links
From: Krzysztof Kozlowski <[email protected]>
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.
--- drivers/base/power/domain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/base/power/domain.c +2 -2
@@ -1673,7 +1673,7 @@ int pm_genpd_add_subdomain_names(const cint pm_genpd_remove_subdomain (struct generic_pm_domain *genpd,struct generic_pm_domain *subdomain) { -struct gpd_link *link; +struct gpd_link *l, *link;int ret = -EINVAL ;if (IS_ERR_OR_NULL (genpd) ||IS_ERR_OR_NULL (subdomain))
@@ -1682,7 +1682,7 @@ int pm_genpd_remove_subdomain(struct gen start:genpd_acquire_lock (genpd); -list_for_each_entry (link, &genpd->master_links, master_node) { +list_for_each_entry_safe (link, l, &genpd->master_links, master_node) {if (link->slave != subdomain)continue ;
Patches currently in stable-queue which might be from [email protected] are
queue-3.18/pm-domains-fix-unsafe-iteration-over-modified-list-of-domain-providers.patch queue-3.18/pm-domains-fix-unsafe-iteration-over-modified-list-of-device-links.patch