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] [day] [month] [year] [list]
Message-ID: <173409155850.412.11730564987439132370.tip-bot2@tip-bot2>
Date: Fri, 13 Dec 2024 12:05:58 -0000
From: "tip-bot2 for John Stultz" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Todd Kjos <tkjos@...gle.com>, John Stultz <jstultz@...gle.com>,
 "Peter Zijlstra (Intel)" <peterz@...radead.org>,
 Juri Lelli <juri.lelli@...hat.com>, x86@...nel.org,
 linux-kernel@...r.kernel.org
Subject: [tip: sched/core] sched: deadline: Cleanup goto label in
 pick_earliest_pushable_dl_task

The following commit has been merged into the sched/core branch of tip:

Commit-ID:     7675361ff9a1d9038025c05267600d0c762c0236
Gitweb:        https://git.kernel.org/tip/7675361ff9a1d9038025c05267600d0c762c0236
Author:        John Stultz <jstultz@...gle.com>
AuthorDate:    Thu, 05 Dec 2024 15:59:35 -08:00
Committer:     Peter Zijlstra <peterz@...radead.org>
CommitterDate: Tue, 10 Dec 2024 15:07:06 +01:00

sched: deadline: Cleanup goto label in pick_earliest_pushable_dl_task

Commit 8b5e770ed7c0 ("sched/deadline: Optimize pull_dl_task()")
added a goto label seems would be better written as a while
loop.

So replace the goto with a while loop, to make it easier to read.

Reported-by: Todd Kjos <tkjos@...gle.com>
Signed-off-by: John Stultz <jstultz@...gle.com>
Reviewed-and-tested-by: K Prateek Nayak <kprateek.nayak@....com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Acked-by: Juri Lelli <juri.lelli@...hat.com>
Link: https://lore.kernel.org/r/20241206000009.1226085-1-jstultz@google.com
---
 kernel/sched/deadline.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index 33b4646..643d101 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -2516,16 +2516,13 @@ static struct task_struct *pick_earliest_pushable_dl_task(struct rq *rq, int cpu
 		return NULL;
 
 	next_node = rb_first_cached(&rq->dl.pushable_dl_tasks_root);
-
-next_node:
-	if (next_node) {
+	while (next_node) {
 		p = __node_2_pdl(next_node);
 
 		if (task_is_pushable(rq, p, cpu))
 			return p;
 
 		next_node = rb_next(next_node);
-		goto next_node;
 	}
 
 	return NULL;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ