diff options
author | John Ogness <john.ogness@linutronix.de> | 2024-02-07 14:46:58 +0106 |
---|---|---|
committer | Petr Mladek <pmladek@suse.com> | 2024-02-07 17:23:18 +0100 |
commit | ac7d7844c64d15603daa3e905a311ddcfbb4bc91 (patch) | |
tree | 69deb41aa5b9ea502ebc37a8dffbf9a441d99923 /kernel/auditfilter.c | |
parent | 584528d621459d1a5c31da7a591218ad3bb96d6c (diff) |
printk: Wait for all reserved records with pr_flush()
Currently pr_flush() will only wait for records that were
available to readers at the time of the call (using
prb_next_seq()). But there may be more records (non-finalized)
that have following finalized records. pr_flush() should wait
for these to print as well. Particularly because any trailing
finalized records may be the messages that the calling context
wants to ensure are printed.
Add a new ringbuffer function prb_next_reserve_seq() to return
the sequence number following the most recently reserved record.
This guarantees that pr_flush() will wait until all current
printk() messages (completed or in progress) have been printed.
Fixes: 3b604ca81202 ("printk: add pr_flush()")
Signed-off-by: John Ogness <john.ogness@linutronix.de>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20240207134103.1357162-10-john.ogness@linutronix.de
Signed-off-by: Petr Mladek <pmladek@suse.com>
Diffstat (limited to 'kernel/auditfilter.c')
0 files changed, 0 insertions, 0 deletions