]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Mar 2013 19:41:10 +0000 (12:41 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Mar 2013 19:41:10 +0000 (12:41 -0700)
added patches:
hwmon-sht15-fix-memory-leak-if-regulator_enable-fails.patch

queue-3.4/hwmon-sht15-fix-memory-leak-if-regulator_enable-fails.patch [new file with mode: 0644]
queue-3.4/series

diff --git a/queue-3.4/hwmon-sht15-fix-memory-leak-if-regulator_enable-fails.patch b/queue-3.4/hwmon-sht15-fix-memory-leak-if-regulator_enable-fails.patch
new file mode 100644 (file)
index 0000000..b16b59f
--- /dev/null
@@ -0,0 +1,36 @@
+From linux@roeck-us.net  Mon Mar 18 12:40:31 2013
+From: Guenter Roeck <linux@roeck-us.net>
+Date: Sat, 16 Mar 2013 06:32:16 -0700
+Subject: hwmon: (sht15) Fix memory leak if regulator_enable() fails
+To: stable@vger.kernel.org
+Cc: Ben Hutchings <ben@decadent.org.uk>, Guenter Roeck <linux@roeck-us.net>
+Message-ID: <1363440736-14964-1-git-send-email-linux@roeck-us.net>
+
+From: Ben Hutchings <ben@decadent.org.uk>
+
+Commit 3e78080f8148 ('hwmon: (sht15) Check return value of
+regulator_enable()') depends on the use of devm_kmalloc() for automatic
+resource cleanup in the failure cases, which was introduced in 3.7.  In
+older stable branches, explicit cleanup is needed.
+
+Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+Applies to stable branches between 3.0 and 3.6 where commit 3e78080f8148
+has been applied.
+
+ drivers/hwmon/sht15.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/hwmon/sht15.c
++++ b/drivers/hwmon/sht15.c
+@@ -930,7 +930,7 @@ static int __devinit sht15_probe(struct
+               if (ret != 0) {
+                       dev_err(&pdev->dev,
+                               "failed to enable regulator: %d\n", ret);
+-                      return ret;
++                      goto err_free_data;
+               }
+               /*
index 1776c63804a0471440631302fe8a8b2377141bf0..383b67025ff8bcbd6cea5e17c2ade03d52e97013 100644 (file)
@@ -29,3 +29,4 @@ s390-mm-fix-flush_tlb_kernel_range.patch
 btrfs-use-rcu_barrier-to-wait-for-bdev-puts-at-unmount.patch
 atmel_lcdfb-fix-16-bpp-modes-on-older-socs.patch
 drm-i915-ebusy-status-handling-added-to-i915_gem_fault.patch
+hwmon-sht15-fix-memory-leak-if-regulator_enable-fails.patch