printk: add syslog_lock
authorJohn Ogness <john.ogness@linutronix.de>
Wed, 3 Mar 2021 10:15:23 +0000 (11:15 +0100)
committerPetr Mladek <pmladek@suse.com>
Mon, 8 Mar 2021 10:43:20 +0000 (11:43 +0100)
commit636babdc06961f173696cb664550b4cc239dde2e
tree470388fb57098441f2ab5496945656cdda10357a
parent35b2b1634849ac19b2dd28cae6c97b64c4299830
printk: add syslog_lock

The global variables @syslog_seq, @syslog_partial, @syslog_time
and write access to @clear_seq are protected by @logbuf_lock.
Once @logbuf_lock is removed, these variables will need their
own synchronization method. Introduce @syslog_lock for this
purpose.

@syslog_lock is a raw_spin_lock for now. This simplifies the
transition to removing @logbuf_lock. Once @logbuf_lock and the
safe buffers are removed, @syslog_lock can change to spin_lock.

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/20210303101528.29901-11-john.ogness@linutronix.de
kernel/printk/printk.c