1 From 1b96d54cc0f69e08f25fc1ae50016674911ae6c7 Mon Sep 17 00:00:00 2001
2 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
3 Date: Thu, 19 May 2016 17:45:27 +0200
4 Subject: [PATCH 345/366] kernel/printk: Don't try to print from IRQ/NMI region
6 On -RT we try to acquire sleeping locks which might lead to warnings
7 from lockdep or a warn_on() from spin_try_lock() (which is a rtmutex on
9 We don't print in general from a IRQ off region so we should not try
10 this via console_unblank() / bust_spinlocks() as well.
12 Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
14 kernel/printk/printk.c | 10 ++++++++++
15 1 file changed, 10 insertions(+)
17 diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
18 index cd377c4..cbc627a 100644
19 --- a/kernel/printk/printk.c
20 +++ b/kernel/printk/printk.c
21 @@ -1526,6 +1526,11 @@ static void call_force_console_drivers(const char *force_text,
25 + if (IS_ENABLED(CONFIG_PREEMPT_RT_BASE)) {
26 + if (in_irq() || in_nmi())
31 for_each_console(con) {
32 if (exclusive_console && con != exclusive_console)
33 @@ -2514,6 +2519,11 @@ void console_unblank(void)
37 + if (IS_ENABLED(CONFIG_PREEMPT_RT_BASE)) {
38 + if (in_irq() || in_nmi())
43 * console_unblank can no longer be called in interrupt context unless
44 * oops_in_progress is set to 1..