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: <172224924493.2215.13390344179986374598.tip-bot2@tip-bot2>
Date: Mon, 29 Jul 2024 10:34:04 -0000
From: "tip-bot2 for Youssef Esmat" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Youssef Esmat <youssefesmat@...gle.com>,
 Daniel Bristot de Oliveira <bristot@...nel.org>,
 "Peter Zijlstra (Intel)" <peterz@...radead.org>,
 Juri Lelli <juri.lelli@...hat.com>, stable@...r.kernel.org, x86@...nel.org,
 linux-kernel@...r.kernel.org
Subject:
 [tip: sched/core] sched/core: Clear prev->dl_server in CFS pick fast path

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

Commit-ID:     a741b82423f41501e301eb6f9820b45ca202e877
Gitweb:        https://git.kernel.org/tip/a741b82423f41501e301eb6f9820b45ca202e877
Author:        Youssef Esmat <youssefesmat@...gle.com>
AuthorDate:    Mon, 27 May 2024 14:06:49 +02:00
Committer:     Peter Zijlstra <peterz@...radead.org>
CommitterDate: Mon, 29 Jul 2024 12:22:35 +02:00

sched/core: Clear prev->dl_server in CFS pick fast path

In case the previous pick was a DL server pick, ->dl_server might be
set. Clear it in the fast path as well.

Fixes: 63ba8422f876 ("sched/deadline: Introduce deadline servers")
Signed-off-by: Youssef Esmat <youssefesmat@...gle.com>
Signed-off-by: Daniel Bristot de Oliveira <bristot@...nel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Tested-by: Juri Lelli <juri.lelli@...hat.com>
Cc: stable@...r.kernel.org
Link: https://lore.kernel.org/r/7f7381ccba09efcb4a1c1ff808ed58385eccc222.1716811044.git.bristot@kernel.org
---
 kernel/sched/core.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index e61da3b..1074ae8 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -5840,6 +5840,13 @@ __pick_next_task(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)
 		}
 
 		/*
+		 * This is a normal CFS pick, but the previous could be a DL pick.
+		 * Clear it as previous is no longer picked.
+		 */
+		if (prev->dl_server)
+			prev->dl_server = NULL;
+
+		/*
 		 * This is the fast path; it cannot be a DL server pick;
 		 * therefore even if @p == @prev, ->dl_server must be NULL.
 		 */

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ