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>] [day] [month] [year] [list]
Message-Id: <20181008132632.83752-1-smuchun@gmail.com>
Date:   Mon,  8 Oct 2018 21:26:32 +0800
From:   Song Muchun <smuchun@...il.com>
To:     mingo@...hat.com, peterz@...radead.org
Cc:     linux-kernel@...r.kernel.org, Song Muchun <smuchun@...il.com>
Subject: [PATCH] sched/fair: Fix update min_vruntime in dequeue_entity()

The comment and the code around 2nd update_min_vruntime() are
not in agreement. From commit b60205c7c558 ("sched/fair: Fix
min_vruntime tracking"), I think that we want to update min_vruntime
when a task is sleeping/migrating. So, the check is inverted there.

Signed-off-by: Song Muchun <smuchun@...il.com>
---
 kernel/sched/fair.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index a8f601edd958..c48ab0d1751e 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -4003,7 +4003,7 @@ dequeue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags)
 	 * put back on, and if we advance min_vruntime, we'll be placed back
 	 * further than we started -- ie. we'll be penalized.
 	 */
-	if ((flags & (DEQUEUE_SAVE | DEQUEUE_MOVE)) == DEQUEUE_SAVE)
+	if ((flags & (DEQUEUE_SAVE | DEQUEUE_MOVE)) != DEQUEUE_SAVE)
 		update_min_vruntime(cfs_rq);
 }
 
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ