[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-a5cbdf693a60d5b86d4d21dfedd90f17754eb273@git.kernel.org>
Date: Sat, 15 Apr 2017 07:19:06 -0700
From: tip-bot for Thomas Gleixner <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: fenghua.yu@...el.com, herbert@...dor.apana.org.au, lenb@...nel.org,
benh@...nel.crashing.org, hpa@...or.com, mingo@...nel.org,
viresh.kumar@...aro.org, tony.luck@...el.com,
bigeasy@...utronix.de, peterz@...radead.org, tj@...nel.org,
mpe@...erman.id.au, jiangshanlai@...il.com, davem@...emloft.net,
linux-kernel@...r.kernel.org, tglx@...utronix.de, rjw@...ysocki.net
Subject: [tip:sched/core] ACPI/processor: Fix error handling in
__acpi_processor_start()
Commit-ID: a5cbdf693a60d5b86d4d21dfedd90f17754eb273
Gitweb: http://git.kernel.org/tip/a5cbdf693a60d5b86d4d21dfedd90f17754eb273
Author: Thomas Gleixner <tglx@...utronix.de>
AuthorDate: Wed, 12 Apr 2017 22:07:33 +0200
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitDate: Sat, 15 Apr 2017 12:20:54 +0200
ACPI/processor: Fix error handling in __acpi_processor_start()
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>
---
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 9d5f0c7..eab8cda 100644
--- a/drivers/acpi/processor_driver.c
+++ b/drivers/acpi/processor_driver.c
@@ -251,6 +251,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;
Powered by blists - more mailing lists