Files
linux/kernel
John Ogness bb07b16c44 printk: limit second loop of syslog_print_all
The second loop of syslog_print_all() subtracts lengths that were
added in the first loop. With commit b031a684bf ("printk: remove
logbuf_lock writer-protection of ringbuffer") it is possible that
records are (over)written during syslog_print_all(). This allows the
possibility of the second loop subtracting lengths that were never
added in the first loop.

This situation can result in syslog_print_all() filling the buffer
starting from a later record, even though there may have been room
to fit the earlier record(s) as well.

Fixes: b031a684bf ("printk: remove logbuf_lock writer-protection of ringbuffer")
Signed-off-by: John Ogness <[email protected]>
Reviewed-by: Petr Mladek <[email protected]>
Signed-off-by: Petr Mladek <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
2021-03-08 11:42:50 +01:00
..
2020-11-24 16:47:49 +01:00
…
…
…
…
…
…
2021-01-06 16:24:59 -08:00
…
…
…
…
…
…
…
…
…
2020-12-15 22:46:19 -08:00
…
2020-11-14 11:26:04 -08:00
…
…
…
…
2020-12-01 10:30:28 +00:00
2021-01-22 15:09:42 +01:00
…
2020-12-19 11:18:38 -08:00
2021-01-29 10:06:46 +05:30
…
…
…
…
…
…
…
…