summaryrefslogtreecommitdiff
path: root/lib/nmi_backtrace.c
diff options
context:
space:
mode:
authorJohn Ogness <john.ogness@linutronix.de>2021-07-15 21:39:59 +0206
committerPetr Mladek <pmladek@suse.com>2021-07-26 15:09:57 +0200
commit8d909b2333f37e5da84a9e6a2cbe21f52be5f42a (patch)
tree20bd0d69f7541af943f6d197864d605423b58c87 /lib/nmi_backtrace.c
parentb371cbb584d843bc4194d0cd4ce5ecd19b0cf55f (diff)
printk: syslog: close window between wait and read
Syslog's SYSLOG_ACTION_READ is supposed to block until the next syslog record can be read, and then it should read that record. However, because @syslog_lock is not held between waking up and reading the record, another reader could read the record first, thus causing SYSLOG_ACTION_READ to return with a value of 0, never having read _anything_. By holding @syslog_lock between waking up and reading, it can be guaranteed that SYSLOG_ACTION_READ blocks until it successfully reads a syslog record (or a real error occurs). 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-7-john.ogness@linutronix.de
Diffstat (limited to 'lib/nmi_backtrace.c')
0 files changed, 0 insertions, 0 deletions