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: <YQE0P9PLd3Uib7eu@hirez.programming.kicks-ass.net>
Date:   Wed, 28 Jul 2021 12:41:03 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     mika.penttila@...il.com
Cc:     linux-kernel@...r.kernel.org, lirongqing@...du.com,
        pbonzini@...hat.com, mingo@...hat.com, kvm@...r.kernel.org,
        Mel Gorman <mgorman@...e.de>
Subject: Re: [PATCH] is_core_idle() is using a wrong variable

On Thu, Jul 22, 2021 at 09:39:46AM +0300, mika.penttila@...il.com wrote:
> From: Mika Penttilä <mika.penttila@...il.com>
> 
> is_core_idle() was using a wrong variable in the loop test. Fix it.
> 
> Signed-off-by: Mika Penttilä <mika.penttila@...il.com>

Thanks!

---
Subject: sched/numa: Fix is_core_idle()
From: Mika Penttilä <mika.penttila@...il.com>
Date: Thu, 22 Jul 2021 09:39:46 +0300

From: Mika Penttilä <mika.penttila@...il.com>

Use the loop variable instead of the function argument to test the
other SMT siblings for idle.

Fixes: ff7db0bf24db ("sched/numa: Prefer using an idle CPU as a migration target instead of comparing tasks")
Signed-off-by: Mika Penttilä <mika.penttila@...il.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Link: https://lkml.kernel.org/r/20210722063946.28951-1-mika.penttila@gmail.com
---
 kernel/sched/fair.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -1486,7 +1486,7 @@ static inline bool is_core_idle(int cpu)
 		if (cpu == sibling)
 			continue;
 
-		if (!idle_cpu(cpu))
+		if (!idle_cpu(sibling))
 			return false;
 	}
 #endif

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ