Messages in this thread Patch in this message | | | Date | Wed, 5 Sep 2018 17:33:26 +0900 | From | Sergey Senozhatsky <> | Subject | Re: [PATCH 4.19 regression fix] printk: For early boot messages check loglevel when flushing the buffer |
| |
On (09/05/18 14:36), Sergey Senozhatsky wrote: > > Just a demonstration of the idea. It does not look very good, tho. > I'd rather have just one suppress_message_printing() in printk code. > > // This is not a proposed patch, hence the 80-cols violation. > > --- > > diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c > index c036f128cdc3..231ac18423e1 100644 > --- a/kernel/printk/printk.c > +++ b/kernel/printk/printk.c > @@ -2416,7 +2416,7 @@ void console_unlock(void) > break; > > msg = log_from_idx(console_idx); > - if (msg->flags & LOG_NOCONS) { > + if (msg->flags & LOG_NOCONS || (exclusive_console && suppress_message_printing(msg->level))) { > /* > * Skip record if !ignore_loglevel, and > * record has level above the console loglevel.
D'oh... Sorry about that, but, believe it or not, this is completely not what I had in my mind. What I had, was something like this:
---
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index c036f128cdc3..dadb8c11b0d6 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -2416,6 +2416,11 @@ void console_unlock(void) break; msg = log_from_idx(console_idx); + + if (exclusive_console && + !suppress_message_printing(msg->level)) + msg->flags &= ~LOG_NOCONS; + if (msg->flags & LOG_NOCONS) { /* * Skip record if !ignore_loglevel, and --- -ss
| |