46 lines
1.6 KiB
Diff
46 lines
1.6 KiB
Diff
From: Thomas Gleixner <tglx@linutronix.de>
|
|
Date: Wed, 12 Apr 2017 22:07:33 +0200
|
|
Subject: [PATCH 07/13] ACPI/processor: Fix error handling in
|
|
__acpi_processor_start()
|
|
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.11/older/patches-4.11.8-rt5.tar.xz
|
|
|
|
When acpi_install_notify_handler() fails the cooling device stays
|
|
registered and the sysfs files created via acpi_pss_perf_init() are
|
|
leaked and the function returns success.
|
|
|
|
Undo acpi_pss_perf_init() and return a proper error code.
|
|
|
|
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
|
Cc: Fenghua Yu <fenghua.yu@intel.com>
|
|
Cc: Tony Luck <tony.luck@intel.com>
|
|
Cc: Herbert Xu <herbert@gondor.apana.org.au>
|
|
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
|
|
Cc: Peter Zijlstra <peterz@infradead.org>
|
|
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Cc: Sebastian Siewior <bigeasy@linutronix.de>
|
|
Cc: Lai Jiangshan <jiangshanlai@gmail.com>
|
|
Cc: linux-acpi@vger.kernel.org
|
|
Cc: Viresh Kumar <viresh.kumar@linaro.org>
|
|
Cc: Michael Ellerman <mpe@ellerman.id.au>
|
|
Cc: Tejun Heo <tj@kernel.org>
|
|
Cc: "David S. Miller" <davem@davemloft.net>
|
|
Cc: Len Brown <lenb@kernel.org>
|
|
Link: http://lkml.kernel.org/r/20170412201042.695499645@linutronix.de
|
|
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
|
---
|
|
drivers/acpi/processor_driver.c | 3 +++
|
|
1 file changed, 3 insertions(+)
|
|
|
|
--- a/drivers/acpi/processor_driver.c
|
|
+++ b/drivers/acpi/processor_driver.c
|
|
@@ -251,6 +251,9 @@ static int __acpi_processor_start(struct
|
|
if (ACPI_SUCCESS(status))
|
|
return 0;
|
|
|
|
+ result = -ENODEV;
|
|
+ acpi_pss_perf_exit(pr, device);
|
|
+
|
|
err_power_exit:
|
|
acpi_processor_power_exit(pr);
|
|
return result;
|