]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.8-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Apr 2013 20:53:55 +0000 (13:53 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Apr 2013 20:53:55 +0000 (13:53 -0700)
added patches:
regulator-fix-memory-garbage-dev_err-printout.patch

queue-3.8/regulator-fix-memory-garbage-dev_err-printout.patch [new file with mode: 0644]
queue-3.8/series

diff --git a/queue-3.8/regulator-fix-memory-garbage-dev_err-printout.patch b/queue-3.8/regulator-fix-memory-garbage-dev_err-printout.patch
new file mode 100644 (file)
index 0000000..07444a0
--- /dev/null
@@ -0,0 +1,44 @@
+From 9c7b4e8a8ad2624106fbf690fa97ab9c8c9bfa88 Mon Sep 17 00:00:00 2001
+From: Russ Dill <Russ.Dill@ti.com>
+Date: Thu, 14 Feb 2013 04:46:33 -0800
+Subject: regulator: Fix memory garbage dev_err printout.
+
+From: Russ Dill <Russ.Dill@ti.com>
+
+commit 9c7b4e8a8ad2624106fbf690fa97ab9c8c9bfa88 upstream.
+
+commit dd8004af: 'regulator: core: Log when a device causes a voltage
+constraint fail', tried to print out some information about the
+check consumer min/max uV fixup, however, it uses a garbage pointer
+left over from list_for_each_entry leading to boot messages in the
+form:
+
+'[    2.079890] <RANDOM ASCII>: Restricting voltage, 3735899821-4294967295uV'
+
+Because it references regulator->dev, it could potentially read memory from
+anywhere causing a panic.
+
+This patch instead uses rdev and the updated min/max uV values.
+
+Signed-off-by: Russ Dill <Russ.Dill@ti.com>
+Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Cc: Jonghwan Choi <jhbird.choi@samsung.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/regulator/core.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/regulator/core.c
++++ b/drivers/regulator/core.c
+@@ -200,8 +200,8 @@ static int regulator_check_consumers(str
+       }
+       if (*min_uV > *max_uV) {
+-              dev_err(regulator->dev, "Restricting voltage, %u-%uuV\n",
+-                      regulator->min_uV, regulator->max_uV);
++              rdev_err(rdev, "Restricting voltage, %u-%uuV\n",
++                      *min_uV, *max_uV);
+               return -EINVAL;
+       }
index 4239bfd71807c7de93cb5ab5960ac9a600aa505b..3191afc8a5d2d9171a847d5132a04cef9efdf34a 100644 (file)
@@ -93,3 +93,4 @@ xen-events-avoid-race-with-raising-an-event-in-unmask_evtchn.patch
 tracing-prevent-buffer-overwrite-disabled-for-latency-tracers.patch
 efivars-explicitly-calculate-length-of-variablename.patch
 efivars-handle-duplicate-names-from-get_next_variable.patch
+regulator-fix-memory-garbage-dev_err-printout.patch