summaryrefslogtreecommitdiff
path: root/lib/nmi_backtrace.c
diff options
context:
space:
mode:
authorJohn Ogness <john.ogness@linutronix.de>2021-07-15 22:33:58 +0300
committerPetr Mladek <pmladek@suse.com>2021-07-26 16:09:50 +0300
commitb371cbb584d843bc4194d0cd4ce5ecd19b0cf55f (patch)
tree295158c7c7df8e7149f5aa6ce55ac961de1d43e2 /lib/nmi_backtrace.c
parent85e3e7fbbb720b9897fba9a99659e31cbd1c082e (diff)
downloadlinux-b371cbb584d843bc4194d0cd4ce5ecd19b0cf55f.tar.xz
printk: convert @syslog_lock to mutex
@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> Signed-off-by: Petr Mladek <pmladek@suse.com> Link: https://lore.kernel.org/r/20210715193359.25946-6-john.ogness@linutronix.de
Diffstat (limited to 'lib/nmi_backtrace.c')
0 files changed, 0 insertions, 0 deletions