From: Greg Kroah-Hartman Date: Mon, 18 Mar 2013 19:41:57 +0000 (-0700) Subject: 3.0-stable patches X-Git-Tag: v3.0.70~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f4022ed8e5ee30c88ff40d8b29c19741743dd574;p=thirdparty%2Fkernel%2Fstable-queue.git 3.0-stable patches added patches: hwmon-sht15-fix-memory-leak-if-regulator_enable-fails.patch --- diff --git a/queue-3.0/hwmon-sht15-fix-memory-leak-if-regulator_enable-fails.patch b/queue-3.0/hwmon-sht15-fix-memory-leak-if-regulator_enable-fails.patch new file mode 100644 index 00000000000..b16b59f6277 --- /dev/null +++ b/queue-3.0/hwmon-sht15-fix-memory-leak-if-regulator_enable-fails.patch @@ -0,0 +1,36 @@ +From linux@roeck-us.net Mon Mar 18 12:40:31 2013 +From: Guenter Roeck +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 , Guenter Roeck +Message-ID: <1363440736-14964-1-git-send-email-linux@roeck-us.net> + +From: Ben Hutchings + +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 +Signed-off-by: Guenter Roeck +Signed-off-by: Greg Kroah-Hartman +--- +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; + } + + /* diff --git a/queue-3.0/series b/queue-3.0/series index 1aac87db765..35d3f00fc88 100644 --- a/queue-3.0/series +++ b/queue-3.0/series @@ -25,3 +25,4 @@ perf-x86-fix-link-failure-for-non-intel-configs.patch s390-mm-fix-flush_tlb_kernel_range.patch btrfs-use-rcu_barrier-to-wait-for-bdev-puts-at-unmount.patch drm-i915-ebusy-status-handling-added-to-i915_gem_fault.patch +hwmon-sht15-fix-memory-leak-if-regulator_enable-fails.patch