All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Mladek <pmladek@suse.com>
To: John Ogness <john.ogness@linutronix.de>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH printk v4 5/6] printk: convert @syslog_lock to mutex
Date: Wed, 21 Jul 2021 14:21:31 +0200	[thread overview]
Message-ID: <20210721122131.dlmkv7jsk2exj22y@pathway.suse.cz> (raw)
In-Reply-To: <20210715193359.25946-6-john.ogness@linutronix.de>

On Thu 2021-07-15 21:39:58, John Ogness wrote:
> @syslog_lock was a raw_spin_lock to simplify the transition of
> removing @logbuf_lock and the safe buffers. With that transition
> complete, and since all uses of @syslog_lock are within sleepable
> contexts, @syslog_lock can become a mutex.
> 
> Note that until now register_console() would disable interrupts
> using irqsave, which implies that it may be called with interrupts
> disabled. And indeed, there is one possible call chain on parisc
> where this happens:
> 
> handle_interruption(code=1) /* High-priority machine check (HPMC) */
>   pdc_console_restart()
>     pdc_console_init_force()
>       register_console()
> 
> However, register_console() calls console_lock(), which might sleep.
> So it has never been allowed to call register_console() from an
> atomic context and the above call chain is a bug.
> 
> Note that the removal of read_syslog_seq_irq() is slightly changing
> the behavior of SYSLOG_ACTION_READ by testing against a possibly
> outdated @seq value. However, the value of @seq could have changed
> after the test, so it is not a new window. A follow-up commit closes
> this window.
> 
> Signed-off-by: John Ogness <john.ogness@linutronix.de>

Reviewed-by: Petr Mladek <pmladek@suse.com>

Best Regards,
Petr

  reply	other threads:[~2021-07-21 12:21 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-15 19:33 [PATCH printk v4 0/6] printk: remove safe buffers John Ogness
2021-07-15 19:33 ` John Ogness
2021-07-15 19:33 ` John Ogness
2021-07-15 19:33 ` John Ogness
2021-07-15 19:33 ` [PATCH printk v4 1/6] lib/nmi_backtrace: explicitly serialize banner and regs John Ogness
2021-07-15 19:33 ` [PATCH printk v4 2/6] printk: track/limit recursion John Ogness
2021-07-15 19:33 ` [PATCH printk v4 3/6] printk: remove safe buffers John Ogness
2021-07-15 19:33   ` John Ogness
2021-07-15 19:33   ` John Ogness
2021-07-21 11:25   ` Petr Mladek
2021-07-21 11:25     ` Petr Mladek
2021-07-21 11:25     ` Petr Mladek
2021-09-02 16:48   ` Geert Uytterhoeven
2021-09-02 16:48     ` Geert Uytterhoeven
2021-09-02 16:48     ` Geert Uytterhoeven
2021-07-15 19:33 ` [PATCH printk v4 4/6] printk: remove NMI tracking John Ogness
2021-07-15 19:33   ` John Ogness
2021-07-15 19:33   ` John Ogness
2021-07-21 12:00   ` Petr Mladek
2021-07-21 12:00     ` Petr Mladek
2021-07-21 12:00     ` Petr Mladek
2021-07-21 12:46     ` John Ogness
2021-07-21 12:46       ` John Ogness
2021-07-21 12:46       ` John Ogness
2021-07-21 13:08       ` Petr Mladek
2021-07-21 13:08         ` Petr Mladek
2021-07-21 13:08         ` Petr Mladek
2021-07-21 13:23         ` John Ogness
2021-07-21 13:23           ` John Ogness
2021-07-21 13:23           ` John Ogness
2021-07-15 19:33 ` [PATCH printk v4 5/6] printk: convert @syslog_lock to mutex John Ogness
2021-07-21 12:21   ` Petr Mladek [this message]
2021-07-15 19:33 ` [PATCH printk v4 6/6] printk: syslog: close window between wait and read John Ogness
2021-07-21 12:43   ` Petr Mladek
2021-07-27  7:26 ` [PATCH printk v4 0/6] printk: remove safe buffers Petr Mladek
2021-07-27  7:26   ` Petr Mladek
2021-07-27  7:26   ` Petr Mladek
2021-07-27  7:26   ` Petr Mladek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210721122131.dlmkv7jsk2exj22y@pathway.suse.cz \
    --to=pmladek@suse.com \
    --cc=john.ogness@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=senozhatsky@chromium.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.