Re: [PATCH printk 1/1] printk: nbcon: do not require migration disabled for nbcon_get_cpu_emergency_nesting()

From: Petr Mladek
Date: Mon Jul 22 2024 - 09:58:52 EST


On Fri 2024-07-19 15:54:18, John Ogness wrote:
> Since entering emergency state disables preemption, there is no
> need for nbcon_get_cpu_emergency_nesting() to explicitly require
> migration disasbled. Either the current CPU is in emergency state
> (and thus preemption is disabled and the nesting level is not
> zero) or the current CPU is not in emergency state and the nesting
> level must by definition be zero, even when migration is enabled
> and the current CPU could change. The current CPU could never
> change to a CPU that is in emergency 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>

Reviewed-by: Petr Mladek <pmladek@xxxxxxxx>

Best Regards,
Petr