Subject: Re: [PATCH] watchdog: Fix the SOFTLOCKUP_DETECTOR=n case

From: Venkat Rao Bagalkote <[email-masked]>
Date: Fri, 2 May 2025 17:30:25 +0530

On 02/05/25 4:41 pm, Nysal Jan K.A. wrote:
> Update watchdog_thresh when SOFTLOCKUP_DETECTOR=n.
> Additionally fix a build failure in this case as well.
>
> Fixes: 0bff3dababb07 ("watchdog: fix watchdog may detect false positive of softlockup")
> Reported-by: Venkat Rao Bagalkote <[email-masked]>
> Closes: https://lore.kernel.org/all/[email-masked]
> Signed-off-by: Nysal Jan K.A. <[email-masked]>
> ---
> The "Fixes:" SHA1 points to the commit in mm-nonmm-unstable and will need updating
>
>   kernel/watchdog.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/watchdog.c b/kernel/watchdog.c
> index 80d1a1dae27..2d283e92be5 100644
> --- a/kernel/watchdog.c
> +++ b/kernel/watchdog.c
> @@ -923,10 +923,12 @@ static __init void lockup_detector_setup(void)
>   }
>   
>   #else /* CONFIG_SOFTLOCKUP_DETECTOR */
> -static void __lockup_detector_reconfigure(void)
> +static void __lockup_detector_reconfigure(bool thresh_changed)
>   {
>   	cpus_read_lock();
>   	watchdog_hardlockup_stop();
> +	if (thresh_changed)
> +		watchdog_thresh = READ_ONCE(watchdog_thresh_next);
>   	lockup_detector_update_enable();
>   	watchdog_hardlockup_start();
>   	cpus_read_unlock();

Tested this patch, and with this, build is successful. Hence,

Tested-by: Venkat Rao Bagalkote <[email-masked]>

Regards,

Venkat.