Messages in this thread | | | Date | Thu, 14 Jan 2021 23:17:47 +0900 | From | Sergey Senozhatsky <> | Subject | Re: [PATCH] printk: ringbuffer: fix line counting |
| |
On (21/01/13 15:48), John Ogness wrote: > > Counting text lines in a record simply involves counting the number > of newline characters (+1). However, it is searching the full data > block for newline characters, even though the text data can be (and > often is) a subset of that area. Since the extra area in the data > block was never initialized, the result is that extra newlines may > be seen and counted. > > Restrict newline searching to the text data length. > > Fixes: b6cf8b3f3312 ("printk: add lockless ringbuffer") > Signed-off-by: John Ogness <john.ogness@linutronix.de>
Acked-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
-ss
| |