Upgrade to 4.4.50-rt62
[kvmfornfv.git] / kernel / kernel / printk / printk.c
index f75e4b0..c747bdf 100644 (file)
@@ -1527,6 +1527,11 @@ static void call_console_drivers(int level,
        if (!console_drivers)
                return;
 
+       if (IS_ENABLED(CONFIG_PREEMPT_RT_BASE)) {
+               if (in_irq() || in_nmi())
+                       return;
+       }
+
        migrate_disable();
        for_each_console(con) {
                if (exclusive_console && con != exclusive_console)
@@ -2464,6 +2469,11 @@ void console_unblank(void)
 {
        struct console *c;
 
+       if (IS_ENABLED(CONFIG_PREEMPT_RT_BASE)) {
+               if (in_irq() || in_nmi())
+                       return;
+       }
+
        /*
         * console_unblank can no longer be called in interrupt context unless
         * oops_in_progress is set to 1..