lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240313012451.1693807-13-joel@joelfernandes.org>
Date: Tue, 12 Mar 2024 21:24:48 -0400
From: "Joel Fernandes (Google)" <joel@...lfernandes.org>
To: linux-kernel@...r.kernel.org,
	Ingo Molnar <mingo@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Juri Lelli <juri.lelli@...hat.com>,
	Vincent Guittot <vincent.guittot@...aro.org>,
	Dietmar Eggemann <dietmar.eggemann@....com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Ben Segall <bsegall@...gle.com>,
	Mel Gorman <mgorman@...e.de>,
	Daniel Bristot de Oliveira <bristot@...hat.com>,
	Valentin Schneider <vschneid@...hat.com>
Cc: Suleiman Souhlal <suleiman@...gle.com>,
	Youssef Esmat <youssefesmat@...gle.com>,
	David Vernet <void@...ifault.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	"Paul E . McKenney" <paulmck@...nel.org>,
	joseph.salisbury@...onical.com,
	Luca Abeni <luca.abeni@...tannapisa.it>,
	Tommaso Cucinotta <tommaso.cucinotta@...tannapisa.it>,
	Vineeth Pillai <vineeth@...byteword.org>,
	Shuah Khan <skhan@...uxfoundation.org>,
	Phil Auld <pauld@...hat.com>,
	Joel Fernandes <joel@...lfernandes.org>
Subject: [PATCH v2 12/15] sched/deadline: Reverse args to dl_time_before in replenish

From: Suleiman Souhlal <suleiman@...gle.com>

dl_time_before() seems to be incorrectly used, we need to check that the
0-laxity time is ahead of the rq_clock. Fix it.

Signed-off-by: Joel Fernandes (Google) <joel@...lfernandes.org>
---
 kernel/sched/deadline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index 1d54231fbaa6..dbba95d364e2 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -914,7 +914,7 @@ static void replenish_dl_entity(struct sched_dl_entity *dl_se)
 	 * is in the future, throttle the server and arm the zero laxity timer.
 	 */
 	if (dl_se->dl_defer &&
-	    dl_time_before(dl_se->deadline - dl_se->runtime, rq_clock(rq))) {
+	    dl_time_before(rq_clock(rq), dl_se->deadline - dl_se->runtime)) {
 		if (!is_dl_boosted(dl_se)) {
 			dl_se->dl_defer_armed = 1;
 			dl_se->dl_throttled = 1;
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ