aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dump_stack.c
diff options
context:
space:
mode:
authorJohn Ogness <[email protected]>2024-02-07 13:40:58 +0000
committerPetr Mladek <[email protected]>2024-02-07 16:23:18 +0000
commitac7d7844c64d15603daa3e905a311ddcfbb4bc91 (patch)
tree69deb41aa5b9ea502ebc37a8dffbf9a441d99923 /lib/dump_stack.c
parentprintk: ringbuffer: Cleanup reader terminology (diff)
downloadkernel-ac7d7844c64d15603daa3e905a311ddcfbb4bc91.tar.gz
kernel-ac7d7844c64d15603daa3e905a311ddcfbb4bc91.zip
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/dump_stack.c')
0 files changed, 0 insertions, 0 deletions