Re: [PATCH linux-next] printk: nbcon: Fix nbcon_cpu_emergency_flush() when preemptible

From: Juri Lelli
Date: Wed Jun 05 2024 - 09:00:22 EST


On 05/06/24 12:14, Petr Mladek wrote:
> On Wed 2024-06-05 12:10:50, Petr Mladek wrote:
> > On Wed 2024-06-05 11:57:34, John Ogness wrote:
> > > nbcon_cpu_emergency_flush() can be called in a preemptible
> > > context. In that case the CPU is not in an emergency state.
> > > However, in order to see that the CPU is not in an emergency
> > > state (accessing the per-cpu variable), preemption must be
> > > disabled.
> > >
> > > Disable preemption when checking the CPU state.
> > >
> > > Reported-by: Juri Lelli <juri.lelli@xxxxxxxxxx>
> > > Closes: https://lore.kernel.org/aqkcpca4vgadxc3yzcu74xwq3grslj5m43f3eb5fcs23yo2gy4@gcsnqcts5tos
> > > Fixes: 46a1379208b7 ("printk: nbcon: Implement emergency sections")
> > > Signed-off-by: John Ogness <john.ogness@xxxxxxxxxxxxx>
> >
> > Great catch!
> >
> > Reviewed-by: Petr Mladek <pmladek@xxxxxxxx>
> >
> > I am going to push it...
>
> Juri, should/could I add your Tested-by ?

A yes please if you like. Thanks!

Tested-by: Juri Lelli <juri.lelli@xxxxxxxxxx>

You guys were so quick to act on it! :)

Best,
Juri