Merge branch 'for-4.19-nmi' into for-linus
authorPetr Mladek <pmladek@suse.com>
Tue, 14 Aug 2018 11:36:15 +0000 (13:36 +0200)
committerPetr Mladek <pmladek@suse.com>
Tue, 14 Aug 2018 11:36:15 +0000 (13:36 +0200)
1  2 
include/linux/printk.h
kernel/printk/printk.c

Simple merge
index e2cb0fc18e2d0f7686f2859c9b70d55803ba598d,1d1513215c22fc80a509fcc305bcb073f8ffcf69..9a63aeeaaf5dd7210f7afebadf8b47ae0440bb7b
@@@ -1891,11 -1874,29 +1879,32 @@@ int vprintk_store(int facility, int lev
        if (dict)
                lflags |= LOG_PREFIX|LOG_NEWLINE;
  
-       printed_len = log_output(facility, level, lflags, dict, dictlen, text, text_len);
 +      if (suppress_message_printing(level))
 +              lflags |= LOG_NOCONS;
 +
+       return log_output(facility, level, lflags,
+                         dict, dictlen, text, text_len);
+ }
  
+ asmlinkage int vprintk_emit(int facility, int level,
+                           const char *dict, size_t dictlen,
+                           const char *fmt, va_list args)
+ {
+       int printed_len;
+       bool in_sched = false;
+       unsigned long flags;
+       if (level == LOGLEVEL_SCHED) {
+               level = LOGLEVEL_DEFAULT;
+               in_sched = true;
+       }
+       boot_delay_msec(level);
+       printk_delay();
+       /* This stops the holder of console_sem just where we want him */
+       logbuf_lock_irqsave(flags);
+       printed_len = vprintk_store(facility, level, dict, dictlen, fmt, args);
        logbuf_unlock_irqrestore(flags);
  
        /* If called from the scheduler, we can not call up(). */