From nobody Sun Feb 8 18:10:50 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3865616BE02; Fri, 2 Aug 2024 16:34:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722616454; cv=none; b=lycNAc0jpe1CfpKNJHyCb3glSVoZSy6jWkEgE0Rj365ob4D8AyL87tODXPYADicSql+bgevmly1WMVQQUbVvFyQ2tHN/eoiGufS9YotB6DIpOYd21LY3JC0h5Co4XfzaLa4yeGDluDLxL5ht/OEzl82FYPGeRHowpjvcRxEN3xk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722616454; c=relaxed/simple; bh=9bLn5yGmawFBvnqXge0/NJUOwJecjejLfHHLAoUB0yc=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=azkpCr/2Ep5ANUskb8Vv8H8NAbgOlMV20tXM7DDImMt7ZhgUGMZMDhgCqnOjy/yEg5BfCvhig9T6PDO+Q7tKpPl0gdthB4UWaTfvG09b48AS7dSTREzDSMBUcVZHFdihFgH60N2UCBqKhirFVuxCPJ2GTDAWyGwiR+oSEespReE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=DLzGpwzS; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=V84ErmWD; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="DLzGpwzS"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="V84ErmWD" Date: Fri, 02 Aug 2024 16:34:10 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1722616451; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=b7ARxUaiYZidzCL18/Yr8/6nTCZfAm5uA8+opUKz0uw=; b=DLzGpwzS3zW2pv44H8TOORgOmrT/jHLS647k1ibEQD5eQFNS8VU3yPzUrid/ahfTBJwXBy tEvegao8Ymg/hiExcAav7KKkZUOEfuCle4wBlIhJJ6FbHXZIvTvZvzhUbUk5b3/VVJdBtT /25xdl9TVOiWo/5NVqg6v13BuyJ0hB5BHxUDab5fHzqZLRXg/KtSsLz3ahD+v7Fuhu6V7p Sv1N/cDnagiRsMvcugjabj4KwvTbyOctMmMIw2wez5PxvjBcyb9kuFFmxwY6PPZFARRmVj ubbfj2vxvgjmaUDtD23gqLHyxK/0ngDzqNC7RQyCeOmATWdBqxpydlgNG5wd7Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1722616451; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=b7ARxUaiYZidzCL18/Yr8/6nTCZfAm5uA8+opUKz0uw=; b=V84ErmWDAhyPhg/bLKMHdpShj9Nqv8Oelgud+Ec8dY9FELwJVxxSh9nn/Y23TvrrxMryfF Vtt4y3gS/VJl4JBw== From: "tip-bot2 for Paul E. McKenney" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/urgent] clocksource: Fix brown-bag boolean thinko in cs_watchdog_read() Cc: Borislav Petkov , "Paul E. McKenney" , Thomas Gleixner , stable@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240802154618.4149953-2-paulmck@kernel.org> References: <20240802154618.4149953-2-paulmck@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <172261645098.2215.1439295710951106215.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the timers/urgent branch of tip: Commit-ID: f2655ac2c06a15558e51ed6529de280e1553c86e Gitweb: https://git.kernel.org/tip/f2655ac2c06a15558e51ed6529de280e1= 553c86e Author: Paul E. McKenney AuthorDate: Fri, 02 Aug 2024 08:46:15 -07:00 Committer: Thomas Gleixner CommitterDate: Fri, 02 Aug 2024 18:29:28 +02:00 clocksource: Fix brown-bag boolean thinko in cs_watchdog_read() The current "nretries > 1 || nretries >=3D 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: db3a34e17433 ("clocksource: Retry clock read if long delays detected= ") Reported-by: Borislav Petkov Signed-off-by: Paul E. McKenney Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/all/20240802154618.4149953-2-paulmck@kernel.o= rg --- kernel/time/clocksource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c index d25ba49..d0538a7 100644 --- a/kernel/time/clocksource.c +++ b/kernel/time/clocksource.c @@ -246,7 +246,7 @@ static enum wd_read_status cs_watchdog_read(struct cloc= ksource *cs, u64 *csnow,=20 =20 wd_delay =3D cycles_to_nsec_safe(watchdog, *wdnow, wd_end); if (wd_delay <=3D WATCHDOG_MAX_SKEW) { - if (nretries > 1 || nretries >=3D max_retries) { + if (nretries > 1 && nretries >=3D max_retries) { pr_warn("timekeeping watchdog on CPU%d: %s retried %d times before suc= cess\n", smp_processor_id(), watchdog->name, nretries); }