Re: [PATCH] printk: finalize records with trailing newlines

From: Petr Mladek
Date: Fri Nov 27 2020 - 07:39:34 EST


On Thu 2020-11-26 20:32:18, Kefeng Wang wrote:
>
> On 2020/11/26 19:48, John Ogness wrote:
> > 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: f5f022e53b87 ("printk: reimplement log_cont using record extension")
> > Signed-off-by: John Ogness <john.ogness@xxxxxxxxxxxxx>
> > ---
> > This is an important bugfix for continuous messages and should
> > be part of the 5.10 release.
> >
> > If not applied, newlines will vanish when concatenating
> > continuous with trailing newlines.
> Thanks for you quick fix.
>
> Reported-and-tested-by:  Kefeng Wang <wangkefeng.wang@xxxxxxxxxx>

The patch is committed in printk/linux.git, branch
for-5.10-pr_cont-fixup.

I do not have much experience with pushing fixes this late in the
release cycle.

Normally, I would prefer to give it few days in linux-next. But
the fix is quite trivial. And it would be better to have it
in 10-rc6 rather than in rc7 that might be the last rc before
release.

Thanks a lot for report, fix, and testing.

Best Regards,
Petr