diff options
author | John Ogness <[email protected]> | 2024-02-07 14:46:58 +0106 |
---|---|---|
committer | Petr Mladek <[email protected]> | 2024-02-07 17:23:18 +0100 |
commit | ac7d7844c64d15603daa3e905a311ddcfbb4bc91 (patch) | |
tree | 69deb41aa5b9ea502ebc37a8dffbf9a441d99923 /lib/test_fortify/write_overflow-strscpy.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 <[email protected]>
Reviewed-by: Petr Mladek <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Petr Mladek <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strscpy.c')
0 files changed, 0 insertions, 0 deletions