printk: always use deferred printk when flush printk_safe lines
authorSergey Senozhatsky <sergey.senozhatsky@gmail.com>
Mon, 6 Feb 2017 16:42:53 +0000 (01:42 +0900)
committerPetr Mladek <pmladek@suse.com>
Wed, 8 Feb 2017 10:19:10 +0000 (11:19 +0100)
commit7acac3445acde1c94054cde69ab53503d296c393
tree53508c90b09a00631899d2bf8aeddeee3de23bbd
parent099f1c84c0052ec1b27f1c3942eed5830d86bdbb
printk: always use deferred printk when flush printk_safe lines

Always use printk_deferred() in printk_safe_flush_line().
Flushing can be done from NMI or printk_safe contexts (when
we are in panic), so we can't call console drivers, yet still
want to store the messages in the logbuf buffer. Therefore we
use a deferred printk version.

Link: http://lkml.kernel.org/r/20170206164253.GA463@tigerII.localdomain
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Jan Kara <jack@suse.cz>
Cc: Tejun Heo <tj@kernel.org>
Cc: Calvin Owens <calvinowens@fb.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Peter Hurley <peter@hurleysoftware.com>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Suggested-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/printk/printk_safe.c