Commit 6c3cc702 authored by Liu Wei's avatar Liu Wei
Browse files

sdei_watchdog: do not update last_check_time when no watchdog_hardlockup_check is performed

ascend inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8MZ9I


CVE: N/A

---------------------------------------

In function sdei_watchdog_callback, the last_check_time is used to
determine whether to call watchdog_hardlockup_check. But it may be
updated even when watchdog_hardlockup_check is not called.

Fixes: 0fa83fd0 ("sdei_watchdog: avoid possible false hardlockup")

Signed-off-by: default avatarLiu Wei <lw8186@163.com>
parent 55c81927
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -64,7 +64,6 @@ static int sdei_watchdog_callback(u32 event,
	ktime_t delta, now = ktime_get_mono_fast_ns();

	delta = now - __this_cpu_read(last_check_time);
	__this_cpu_write(last_check_time, now);

	/*
	 * Set delta to 4/5 of the actual watchdog threshold period so the
@@ -78,6 +77,7 @@ static int sdei_watchdog_callback(u32 event,
	}

	watchdog_hardlockup_check(smp_processor_id(), regs);
	__this_cpu_write(last_check_time, now);

	return 0;
}