diff options
author | John Ogness <[email protected]> | 2021-07-15 21:39:59 +0206 |
---|---|---|
committer | Petr Mladek <[email protected]> | 2021-07-26 15:09:57 +0200 |
commit | 8d909b2333f37e5da84a9e6a2cbe21f52be5f42a (patch) | |
tree | 20bd0d69f7541af943f6d197864d605423b58c87 /scripts/gdb/linux/dmesg.py | |
parent | b371cbb584d843bc4194d0cd4ce5ecd19b0cf55f (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 <[email protected]>
Reviewed-by: Petr Mladek <[email protected]>
Signed-off-by: Petr Mladek <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'scripts/gdb/linux/dmesg.py')
0 files changed, 0 insertions, 0 deletions