lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 5 Jun 2011 15:31:12 +0200
From:	Janusz Krzysztofik <jkrzyszt@....icnet.pl>
To:	linux-pm@...ts.linux-foundation.org
Cc:	"Rafael J. Wysocki" <rjw@...k.pl>, Pavel Machek <pavel@....cz>,
	Len Brown <len.brown@...el.com>,
	"Greg Kroah-Hartman" <gregkh@...e.de>,
	linux-kernel@...r.kernel.org,
	"linux-omap@...r.kernel.org" <linux-omap@...r.kernel.org>
Subject: [PATCH 3.0-rc1] PM / runtime: fix broken iteration over clock ids

In its current form, pm_runtime_clk_notify() iterates through sub-
strings of pm_clk_notifier_block.con_ids[0] rather than consecutive 
pm_clk_notifier_block.con_ids[] elements. As a noticeable result, McBSP1 
port no longer worked for me on updated arch/arm/mach-omap1/pm_bus.c 
(commit 600b776eb39a13a28b090ba9efceb0c69d4508aa, "OMAP1 / PM: Use 
generic clock manipulation routines for runtime PM"), not being able to 
activate "fck" when required.

Tested on Amstrad Delta.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@....icnet.pl>
---
 drivers/base/power/clock_ops.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- git/drivers/base/power/clock_ops.c.orig	2011-05-30 22:16:35.000000000 +0200
+++ git/drivers/base/power/clock_ops.c	2011-06-05 15:19:55.000000000 +0200
@@ -291,7 +291,7 @@ static int pm_runtime_clk_notify(struct 
 {
 	struct pm_clk_notifier_block *clknb;
 	struct device *dev = data;
-	char *con_id;
+	char **con_id;
 	int error;
 
 	dev_dbg(dev, "%s() %ld\n", __func__, action);
@@ -309,8 +309,8 @@ static int pm_runtime_clk_notify(struct 
 
 		dev->pwr_domain = clknb->pwr_domain;
 		if (clknb->con_ids[0]) {
-			for (con_id = clknb->con_ids[0]; *con_id; con_id++)
-				pm_runtime_clk_add(dev, con_id);
+			for (con_id = &clknb->con_ids[0]; *con_id; con_id++)
+				pm_runtime_clk_add(dev, *con_id);
 		} else {
 			pm_runtime_clk_add(dev, NULL);
 		}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ