1 From 0d721dc61be426e5bef46a1dd52bf31de316a367 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/365] 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 ecff6e3..3dcec86 100644
19 --- a/kernel/printk/printk.c
20 +++ b/kernel/printk/printk.c
21 @@ -1531,6 +1531,11 @@ static void call_console_drivers(int level,
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 @@ -2472,6 +2477,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..