[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180308050023.8548-17-alexander.levin@microsoft.com>
Date: Thu, 8 Mar 2018 05:01:30 +0000
From: Sasha Levin <Alexander.Levin@...rosoft.com>
To: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"stable@...r.kernel.org" <stable@...r.kernel.org>
CC: Thomas Gleixner <tglx@...utronix.de>,
Fenghua Yu <fenghua.yu@...el.com>,
Tony Luck <tony.luck@...el.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Peter Zijlstra <peterz@...radead.org>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Sebastian Siewior <bigeasy@...utronix.de>,
Lai Jiangshan <jiangshanlai@...il.com>,
"linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>,
Viresh Kumar <viresh.kumar@...aro.org>,
Michael Ellerman <mpe@...erman.id.au>,
Tejun Heo <tj@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Len Brown <lenb@...nel.org>,
Sasha Levin <Alexander.Levin@...rosoft.com>
Subject: [PATCH AUTOSEL for 4.4 017/101] ACPI/processor: Fix error handling in
__acpi_processor_start()
From: Thomas Gleixner <tglx@...utronix.de>
[ Upstream commit a5cbdf693a60d5b86d4d21dfedd90f17754eb273 ]
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@...utronix.de>
Cc: Fenghua Yu <fenghua.yu@...el.com>
Cc: Tony Luck <tony.luck@...el.com>
Cc: Herbert Xu <herbert@...dor.apana.org.au>
Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>
Cc: Sebastian Siewior <bigeasy@...utronix.de>
Cc: Lai Jiangshan <jiangshanlai@...il.com>
Cc: linux-acpi@...r.kernel.org
Cc: Viresh Kumar <viresh.kumar@...aro.org>
Cc: Michael Ellerman <mpe@...erman.id.au>
Cc: Tejun Heo <tj@...nel.org>
Cc: "David S. Miller" <davem@...emloft.net>
Cc: Len Brown <lenb@...nel.org>
Link: http://lkml.kernel.org/r/20170412201042.695499645@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Signed-off-by: Sasha Levin <alexander.levin@...rosoft.com>
---
drivers/acpi/processor_driver.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c
index 11154a330f07..2c086859a0bd 100644
--- a/drivers/acpi/processor_driver.c
+++ b/drivers/acpi/processor_driver.c
@@ -259,6 +259,9 @@ static int __acpi_processor_start(struct acpi_device *device)
if (ACPI_SUCCESS(status))
return 0;
+ result = -ENODEV;
+ acpi_pss_perf_exit(pr, device);
+
err_power_exit:
acpi_processor_power_exit(pr);
return result;
--
2.14.1
Powered by blists - more mailing lists