]> git.baikalelectronics.ru Git - kernel.git/commit
printk: finalize records with trailing newlines
authorJohn Ogness <john.ogness@linutronix.de>
Thu, 26 Nov 2020 11:48:36 +0000 (12:54 +0106)
committerPetr Mladek <pmladek@suse.com>
Fri, 27 Nov 2020 10:58:54 +0000 (11:58 +0100)
commitcd008530b4572d5789bcfbb2612adaed11b41802
tree988e34d10be38b6c17d72a3cce05bc6dfd8abe5f
parent03d23a79e0d450c2f3a4f227cce830d6233d4811
printk: finalize records with trailing newlines

Any record with a trailing newline (LOG_NEWLINE flag) cannot
be continued because the newline has been stripped and will
not be visible if the message is appended. This was already
handled correctly when committing in log_output() but was
not handled correctly when committing in log_store().

Fixes: 1f6df0ed9487 ("printk: reimplement log_cont using record extension")
Link: https://lore.kernel.org/r/20201126114836.14750-1-john.ogness@linutronix.de
Reported-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: John Ogness <john.ogness@linutronix.de>
Tested-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
kernel/printk/printk.c