summaryrefslogtreecommitdiffstats
path: root/kernel/printk
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2016-11-17 11:31:55 -0500
committerThomas Gleixner <tglx@linutronix.de>2016-11-17 13:44:58 -0500
commitf97960fbddd98e1b7bfba469b8510b49a62b4bc5 (patch)
treea69eb9320de272fc7d8a168981b6e55f1abd9e19 /kernel/printk
parent0e285d36bd2bfee0b95433ccc9065c878164f5b2 (diff)
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@alien8.de> Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1611171729320.3645@nanos Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Diffstat (limited to 'kernel/printk')
-rw-r--r--kernel/printk/printk.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index 4487ffcd42d5..37893da9bae8 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -2194,8 +2194,10 @@ void resume_console(void)
2194 */ 2194 */
2195static int console_cpu_notify(unsigned int cpu) 2195static int console_cpu_notify(unsigned int cpu)
2196{ 2196{
2197 console_lock(); 2197 if (!cpuhp_tasks_frozen) {
2198 console_unlock(); 2198 console_lock();
2199 console_unlock();
2200 }
2199 return 0; 2201 return 0;
2200} 2202}
2201 2203