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] [day] [month] [year] [list]
Date:   Thu, 17 Nov 2016 10:51:59 -0800
From:   tip-bot for Thomas Gleixner <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     mingo@...nel.org, bigeasy@...utronix.de, hpa@...or.com,
        bp@...en8.de, peterz@...radead.org, linux-kernel@...r.kernel.org,
        tglx@...utronix.de
Subject: [tip:smp/hotplug] kernel/printk: Block cpuhotplug callback when
 tasks are frozen

Commit-ID:  f97960fbddd98e1b7bfba469b8510b49a62b4bc5
Gitweb:     http://git.kernel.org/tip/f97960fbddd98e1b7bfba469b8510b49a62b4bc5
Author:     Thomas Gleixner <tglx@...utronix.de>
AuthorDate: Thu, 17 Nov 2016 17:31:55 +0100
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Thu, 17 Nov 2016 19:44:58 +0100

kernel/printk: Block cpuhotplug callback when tasks are frozen

The recent conversion of the console hotplug notifier to the state machine
missed the fact, that the notifier only operated on the non frozen
transitions. As a consequence the console_lock/unlock() pair is also
invoked during suspend, which results in a lockdep warning.

Restore the previous state by making the lock/unlock conditional on
!tasks_frozen.

Fixes: 90b14889d2f9 ("kernel/printk: Convert to hotplug state machine")
Reported-and-tested-by: Borislav Petkov <bp@...en8.de>
Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1611171729320.3645@nanos
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Sebastian Andrzej Siewior <bigeasy@...utronix.de>

---
 kernel/printk/printk.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index 4487ffc..37893da 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -2194,8 +2194,10 @@ void resume_console(void)
  */
 static int console_cpu_notify(unsigned int cpu)
 {
-	console_lock();
-	console_unlock();
+	if (!cpuhp_tasks_frozen) {
+		console_lock();
+		console_unlock();
+	}
 	return 0;
 }
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ