lkml.org 
[lkml]   [2017]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCHv7 3/8] printk: introduce per-cpu safe_print seq buffer
On (01/04/17 14:31), Petr Mladek wrote:
> On Tue 2016-12-27 23:16:06, Sergey Senozhatsky wrote:
> > This patch extends the idea of NMI per-cpu buffers to regions
> > that may cause recursive printk() calls and possible deadlocks.
> > Namely, printk() can't handle printk calls from schedule code
> > or printk() calls from lock debugging code (spin_dump() for instance);
> > because those may be called with `sem->lock' already taken or any
> > other `critical' locks (p->pi_lock, etc.). An example of deadlock
> > can be
> >
> > Usage example:
> >
> > printk()
> > printk_safe_enter_irqsave(flags)
> > //
> > // any printk() call from here will endup in vprintk_safe(),
> > // that stores messages in a special per-CPU buffer.
> > //
> > printk_safe_exit_irqrestore(flags)
> >
> > Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
>
> I really like the new variants for printk_safe_enter/exit and
> different IRQ context.
>
> Reviewed-by: Petr Mladek <pmladek@suse.com>

thanks.

-ss

\
 
 \ /
  Last update: 2017-01-05 02:02    [W:0.064 / U:26.792 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site