diff options
| author | Wang Wensheng <wsw9603@163.com> | 2026-10-04 15:57:55 +0800 |
|---|---|---|
| committer | Petr Mladek <pmladek@suse.com> | 2026-10-27 14:52:23 +0100 |
| commit | 2b2dc9dd356aed030e7ac11469d12f736793bc89 (patch) | |
| tree | 7129a00cb048b4276d5624842f60f6442949292c /tools/perf/scripts/python/export-to-postgresql.py | |
| parent | 5b212610d0b8f474f1eef70b9a5aa4b2ecfff788 (diff) | |
printk_ringbuffer: Fix space_used() when blk_lpos->next overflows
Since commit 67e1b0052f6b ("printk_ringbuffer: don't needlessly wrap data
blocks around") blk_lpos is treated as not wrapped when blk_lpos->next
overflows to the start of data_ring. We use the indices of blk_lpos->next
and blk_lpos->start to calculate the size of the data_block. This computes
zero minus a small positive value, resulting in underflow and an
unexpectedly large value. Simply using the original lpos with wrap-counts
solves the problem.
Fixes: 67e1b0052f6b ("printk_ringbuffer: don't needlessly wrap data blocks around")
Signed-off-by: Wang Wensheng <wsw9603@163.com>
Reviewed-by: John Ogness <john.ogness@linutronix.de>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Link: https://patch.msgid.link/20261004075755.363989-1-wsw9603@163.com
Signed-off-by: Petr Mladek <pmladek@suse.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions
