Skip to content
Commit 77c72777 authored by Paul E. McKenney's avatar Paul E. McKenney Committed by Greg Kroah-Hartman
Browse files

clocksource: Fix brown-bag boolean thinko in cs_watchdog_read()

[ Upstream commit f2655ac2c06a15558e51ed6529de280e1553c86e ]

The current "nretries > 1 || nretries >= max_retries" check in
cs_watchdog_read() will always evaluate to true, and thus pr_warn(), if
nretries is greater than 1.  The intent is instead to never warn on the
first try, but otherwise warn if the successful retry was the last retry.

Therefore, change that "||" to "&&".

Fixes: db3a34e1

 ("clocksource: Retry clock read if long delays detected")
Reported-by: default avatarBorislav Petkov <bp@alien8.de>
Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/all/20240802154618.4149953-2-paulmck@kernel.org
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent ff2fb562
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment