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-next>] [day] [month] [year] [list]
Message-Id: <20211009180642.20319-1-tao.zhou@linux.dev>
Date:   Sun, 10 Oct 2021 02:06:42 +0800
From:   Tao Zhou <tao.zhou@...ux.dev>
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>
Cc:     Tao Zhou <tao.zhou@...ux.dev>
Subject: [PATCH] sched/pelt: Use or not add in update_irq_load_avg()

The ret value of update_irq_load_avg() can be 2. And this value
is used in __update_blocked_others(). It should be 0 or 1. Use
OR operation in update_irq_load_avg().
---
 kernel/sched/pelt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/pelt.c b/kernel/sched/pelt.c
index a554e3bbab2b..7edf21f7977c 100644
--- a/kernel/sched/pelt.c
+++ b/kernel/sched/pelt.c
@@ -458,7 +458,7 @@ int update_irq_load_avg(struct rq *rq, u64 running)
 				0,
 				0,
 				0);
-	ret += ___update_load_sum(rq->clock, &rq->avg_irq,
+	ret |= ___update_load_sum(rq->clock, &rq->avg_irq,
 				1,
 				1,
 				1);
-- 
2.32.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ