From 1fdfd5eebb5e64dd228887527e6cee15ee4d2d09 Mon Sep 17 00:00:00 2001 From: Xu Qiang Date: Fri, 26 Nov 2021 16:27:14 +0800 Subject: [PATCH] watchdog/corelockup: Depends on the hardlockup detection switch ascend inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4F3V1 CVE: NA -------------------------------- When hard lockup detection is disabled, core lockup detection is not performed. Signed-off-by: Xu Qiang Reviewed-by: Ding Tianhong Signed-off-by: Yang Yingliang Reviewed-by: Ding Tianhong Signed-off-by: Zheng Zengkai --- kernel/watchdog_hld.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/watchdog_hld.c b/kernel/watchdog_hld.c index 8af4ab738ce9..060873ff8a6d 100644 --- a/kernel/watchdog_hld.c +++ b/kernel/watchdog_hld.c @@ -148,6 +148,10 @@ void watchdog_check_hrtimer(void) if (cpu == smp_processor_id()) return; + /* return if hard lockup detector is disable */ + if (!(watchdog_enabled & NMI_WATCHDOG_ENABLED)) + return; + /* * The freq of hrtimer is fast than nmi interrupts and * the core mustn't hangs if hrtimer still working. -- GitLab