Messages in this thread | | | Date | Tue, 30 Aug 2016 15:03:15 -0700 | From | Andrew Morton <> | Subject | Re: [PATCH v2] printk/nmi: avoid direct printk()-s from __printk_nmi_flush() |
| |
On Wed, 31 Aug 2016 01:13:54 +0900 Sergey Senozhatsky <sergey.senozhatsky@gmail.com> wrote:
> __printk_nmi_flush() can be called from nmi_panic(), therefore it has to > test whether it's executed in NMI context and thus must route the messages > through deferred printk() or via direct printk().
Why? What misbehaviour does the current code cause?
> Except for two places > where __printk_nmi_flush() does unconditional direct printk() calls: > - pr_err("printk_nmi_flush: internal error ...") > - pr_cont("\n") > > Factor out print_nmi_seq_line() parts into a new printk_nmi_flush_line() > function, which takes care of in_nmi(), and use it in __printk_nmi_flush() > for printing and error-reporting.
| |