Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1474007
| From | Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] printk/nmi: avoid direct printk()-s from __printk_nmi_flush() |
| Date | 2016-09-01 03:00 +0200 |
| Message-ID | <scowh-199-3@gated-at.bofh.it> (permalink) |
| References | <sbTVv-7a6-7@gated-at.bofh.it> <sbZoe-2i7-11@gated-at.bofh.it> <sc2P7-4hh-11@gated-at.bofh.it> <sck9j-718-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On (08/31/16 13:15), Andrew Morton wrote:
> > On (08/30/16 15:03), Andrew Morton 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?
> >
> > the reasoning behind the `if in_nmi()' in print_nmi_seq_line()
> >
> > if (in_nmi())
> > printk_deferred("%.*s", (end - start) + 1, buf);
> > else
> > printk("%.*s", (end - start) + 1, buf);
> >
> > was as follows (per Petr's commit message)
>
> OK, thanks, I altered the changelog thusly and scheduled the patch for 4.8:
thanks!
-ss
>
> --- txt/printk-nmi-avoid-direct-printk-s-from-__printk_nmi_flush.txt
> +++ txt/printk-nmi-avoid-direct-printk-s-from-__printk_nmi_flush.txt
> @@ -3,8 +3,13 @@
>
> __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(). Except for two places
> -where __printk_nmi_flush() does unconditional direct printk() calls:
> +through deferred printk() or via direct printk(). This is to avoid
> +potential deadlocks, as described in cf9b1106c81c45cde ("printk/nmi: flush
> +NMI messages on the system panic").
> +
> +However there remain two places where __printk_nmi_flush() does
> +unconditional direct printk() calls:
> +
> - pr_err("printk_nmi_flush: internal error ...")
> - pr_cont("\n")
>
>
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v2] printk/nmi: avoid direct printk()-s from __printk_nmi_flush() Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2016-08-30 18:20 +0200
Re: [PATCH v2] printk/nmi: avoid direct printk()-s from __printk_nmi_flush() Andrew Morton <akpm@linux-foundation.org> - 2016-08-31 00:10 +0200
Re: [PATCH v2] printk/nmi: avoid direct printk()-s from __printk_nmi_flush() Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-08-31 03:50 +0200
Re: [PATCH v2] printk/nmi: avoid direct printk()-s from __printk_nmi_flush() Andrew Morton <akpm@linux-foundation.org> - 2016-08-31 22:20 +0200
Re: [PATCH v2] printk/nmi: avoid direct printk()-s from __printk_nmi_flush() Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-09-01 03:00 +0200
csiph-web