All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch "PM / Domains: Fix unsafe iteration over modified list of domain providers" has been added to the 3.18-stable tree
@ 2017-07-22 14:16 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-07-22 14:16 UTC (permalink / raw)
  To: krzk, gregkh, rafael.j.wysocki, ulf.hansson; +Cc: stable, stable-commits


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 domain providers

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-domain-providers.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 <stable@vger.kernel.org> know about it.


>From b556b15dc04e9b9b98790f04c21acf5e24f994b2 Mon Sep 17 00:00:00 2001
From: Krzysztof Kozlowski <krzk@kernel.org>
Date: Wed, 28 Jun 2017 16:56:19 +0200
Subject: PM / Domains: Fix unsafe iteration over modified list of domain providers

From: Krzysztof Kozlowski <krzk@kernel.org>

commit b556b15dc04e9b9b98790f04c21acf5e24f994b2 upstream.

of_genpd_del_provider() iterates over list of domain provides and
removes matching element thus it has to use safe version of list
iteration.

Fixes: aa42240ab254 (PM / Domains: Add generic OF-based PM domain look-up)
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 |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -2056,10 +2056,10 @@ EXPORT_SYMBOL_GPL(__of_genpd_add_provide
  */
 void of_genpd_del_provider(struct device_node *np)
 {
-	struct of_genpd_provider *cp;
+	struct of_genpd_provider *cp, *tmp;
 
 	mutex_lock(&of_genpd_mutex);
-	list_for_each_entry(cp, &of_genpd_providers, link) {
+	list_for_each_entry_safe(cp, tmp, &of_genpd_providers, link) {
 		if (cp->node == np) {
 			list_del(&cp->link);
 			of_node_put(cp->node);


Patches currently in stable-queue which might be from krzk@kernel.org 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-07-22 14:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-22 14:16 Patch "PM / Domains: Fix unsafe iteration over modified list of domain providers" has been added to the 3.18-stable tree gregkh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.