Re: [PATCH] cpu: fix hard lockup triggered by printk calls within scheduling context

From: Catalin Marinas
Date: Thu Sep 25 2025 - 09:48:46 EST


On Wed, Sep 24, 2025 at 08:32:47PM +0800, shechenglong wrote:
> relocate the printk() calls from spectre_v4_mitigations_off() and
> spectre_v2_mitigations_off() into setup_system_capabilities() function,
> preventing hard lockups that occur when printk() is invoked from scheduler context.
>
> Link: https://patchwork.kernel.org/project/linux-arm-kernel/patch/20250918064907.1832-1-shechenglong@xxxxxxxxxxx/
> Suggested-by: Mark Rutland <mark.rutland@xxxxxxx>
> Suggested-by: Catalin Marinas <catalin.marinas@xxxxxxx>
> Signed-off-by: shechenglong <shechenglong@xxxxxxxxxxx>

It looks fine to me. Thanks.

Reviewed-by: Catalin Marinas <catalin.marinas@xxxxxxx>

Will, do you want to take this for 6.18? It might be worth a cc stable.
In general it's unlikely to happen unless you keep writing to
/sys/kernel/debug/clear_warn_once.

--
Catalin