lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 19 Jul 2016 00:17:21 -0700
From:	tip-bot for Richard Cochran <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	peterz@...radead.org, hpa@...or.com, linux-kernel@...r.kernel.org,
	rcochran@...utronix.de, lenb@...nel.org, bigeasy@...utronix.de,
	mingo@...nel.org, anna-maria@...utronix.de,
	torvalds@...ux-foundation.org, tglx@...utronix.de,
	rjw@...ysocki.net
Subject: [tip:smp/hotplug] ACPI/processor: Avoid STARTING/DYING actions in a
 more logical way

Commit-ID:  e1272f541c6ad476426ef24b56b4e1d3403db513
Gitweb:     http://git.kernel.org/tip/e1272f541c6ad476426ef24b56b4e1d3403db513
Author:     Richard Cochran <rcochran@...utronix.de>
AuthorDate: Wed, 13 Jul 2016 17:16:38 +0000
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Fri, 15 Jul 2016 10:40:24 +0200

ACPI/processor: Avoid STARTING/DYING actions in a more logical way

As part of the hotplug cleanup, the CPU_STARTING/DYING actions are going
away soon.  This driver needlessly uses those two macro, and so this patch
replaces that code with something more sensible.

Commit:

  8da8373447d6a57a5a9f55233d35beb15d92d0d2 ("ACPI / processor: Fix STARTING/DYING action in acpi_cpu_soft_notify()")

added checks for those two actions, because the notification callback can
sleep, causing a hung CPU. This patch instead checks for the ONLINE/DEAD
actions, which are the ones that are handled by the driver in the first
place.

Signed-off-by: Richard Cochran <rcochran@...utronix.de>
Signed-off-by: Anna-Maria Gleixner <anna-maria@...utronix.de>
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: Len Brown <lenb@...nel.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Rafael J. Wysocki <rjw@...ysocki.net>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: linux-acpi@...r.kernel.org
Cc: rt@...utronix.de
Link: http://lkml.kernel.org/r/20160713153335.964962885@linutronix.de
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 drivers/acpi/processor_driver.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c
index d2fa8cb..eecdb19 100644
--- a/drivers/acpi/processor_driver.c
+++ b/drivers/acpi/processor_driver.c
@@ -118,12 +118,13 @@ static int acpi_cpu_soft_notify(struct notifier_block *nfb,
 	struct acpi_device *device;
 	action &= ~CPU_TASKS_FROZEN;
 
-	/*
-	 * CPU_STARTING and CPU_DYING must not sleep. Return here since
-	 * acpi_bus_get_device() may sleep.
-	 */
-	if (action == CPU_STARTING || action == CPU_DYING)
+	switch (action) {
+	case CPU_ONLINE:
+	case CPU_DEAD:
+		break;
+	default:
 		return NOTIFY_DONE;
+	}
 
 	if (!pr || acpi_bus_get_device(pr->handle, &device))
 		return NOTIFY_DONE;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ