[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 8 Oct 2016 03:59:20 +0900
From: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
To: Petr Mladek <pmladek@...e.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
Jan Kara <jack@...e.cz>,
Andrew Morton <akpm@...ux-foundation.org>,
Tejun Heo <tj@...nel.org>, Calvin Owens <calvinowens@...com>,
Thomas Gleixner <tglx@...utronix.de>,
Mel Gorman <mgorman@...hsingularity.net>,
Steven Rostedt <rostedt@...dmis.org>,
linux-kernel@...r.kernel.org,
Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
Subject: Re: [RFC][PATCHv2 6/7] printk: report printk recursion from
alt_printk flush
On (10/06/16 17:41), Petr Mladek wrote:
[..]
> > + if (this_cpu_read(alt_printk_ctx) & ALT_PRINTK_RECURSION_MASK) {
> > + const char *msg = "BUG: recent printk recursion!\n";
> > +
> > + this_cpu_and(alt_printk_ctx, ~ALT_PRINTK_RECURSION_MASK);
> > + alt_printk_flush_line(msg, strlen(msg));
> > + }
> > +
> > /*
> > * This is just a paranoid check that nobody has manipulated
> > * the buffer an unexpected way. If we printed something then
> > @@ -290,6 +297,8 @@ static int vprintk_alt(const char *fmt, va_list args)
> > {
> > struct alt_printk_seq_buf *s = this_cpu_ptr(&alt_print_seq);
> >
> > + /* There is only one way to get here -- a printk recursion. */
> > + this_cpu_or(alt_printk_ctx, ALT_PRINTK_RECURSION_MASK);
>
> Is it really a bug? In most cases, the message that is being printed
> describes a bug. We just allow to print it this alternative way to
> avoid a possible deadlock. IMHO, this might cause a confusion.
just wanted to preserve the existing behavior, but can drop it.
> Instead I would print an error when we missed some messages
> because the alternative buffer was not big enough.
ok, will do.
-ss
Powered by blists - more mailing lists