diff options
author | John Ogness | 2024-02-07 14:46:59 +0106 |
---|---|---|
committer | Petr Mladek | 2024-02-07 17:23:18 +0100 |
commit | b1c4c67a5e90db8fbdb5b5504fe16e17b564cca8 (patch) | |
tree | 0047ff01ef33dd17258710727fbc2c31aa052688 /kernel/exit.h | |
parent | ac7d7844c64d15603daa3e905a311ddcfbb4bc91 (diff) |
printk: ringbuffer: Skip non-finalized records in panic
Normally a reader will stop once reaching a non-finalized
record. However, when a panic happens, writers from other CPUs
(or an interrupted context on the panic CPU) may have been
writing a record and were unable to finalize it. The panic CPU
will reserve/commit/finalize its panic records, but these will
be located after the non-finalized records. This results in
panic() not flushing the panic messages.
Extend _prb_read_valid() to skip over non-finalized records if
on the panic CPU.
Fixes: 896fbe20b4e2 ("printk: use the lockless ringbuffer")
Signed-off-by: John Ogness <john.ogness@linutronix.de>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20240207134103.1357162-11-john.ogness@linutronix.de
Signed-off-by: Petr Mladek <pmladek@suse.com>
Diffstat (limited to 'kernel/exit.h')
0 files changed, 0 insertions, 0 deletions