Messages in this thread | | | Date | Wed, 4 Jan 2017 14:31:56 +0100 | From | Petr Mladek <> | Subject | Re: [PATCHv7 3/8] printk: introduce per-cpu safe_print seq buffer |
| |
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>
Best Regards, Petr
| |