Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1676744 > unrolled thread
| Started by | Krzysztof Kozlowski <krzk@kernel.org> |
|---|---|
| First post | 2017-06-28 17:00 +0200 |
| Last post | 2017-06-28 17:00 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v3 4/8] PM / Domains: Fix unsafe iteration over modified list of domain providers Krzysztof Kozlowski <krzk@kernel.org> - 2017-06-28 17:00 +0200
| From | Krzysztof Kozlowski <krzk@kernel.org> |
|---|---|
| Date | 2017-06-28 17:00 +0200 |
| Subject | [PATCH v3 4/8] PM / Domains: Fix unsafe iteration over modified list of domain providers |
| Message-ID | <tXmBI-86L-23@gated-at.bofh.it> |
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")
Cc: <stable@vger.kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
---
drivers/base/power/domain.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index ebbce6ef0850..793f9f7f3f2d 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -1783,12 +1783,12 @@ EXPORT_SYMBOL_GPL(of_genpd_add_provider_onecell);
*/
void of_genpd_del_provider(struct device_node *np)
{
- struct of_genpd_provider *cp;
+ struct of_genpd_provider *cp, *tmp;
struct generic_pm_domain *gpd;
mutex_lock(&gpd_list_lock);
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) {
/*
* For each PM domain associated with the
--
2.11.0
Back to top | Article view | linux.kernel
csiph-web