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]
Date:	Tue, 19 Jul 2011 14:58:46 -0600
From:	Terry Loftin <terry.loftin@...com>
To:	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
	Peter Zijlstra <peterz@...radead.org>
CC:	Bob Montgomery <bob.montgomery@...com>
Subject: [PATCH 1/2] sched: Fix "divide error: 0000" in find_busiest_group

Correct the protection expression in update_cpu_power() to avoid setting
rq->cpu_power to zero.

Signed-off-by: Terry Loftin <terry.loftin@...com>
Signed-off-by: Bob Montgomery <bob.montgomery@...com>
---
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 0c26e2d..9c50020 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -2549,7 +2549,7 @@ static void update_cpu_power(struct sched_domain *sd, int cpu)
 	power *= scale_rt_power(cpu);
 	power >>= SCHED_LOAD_SHIFT;

-	if (!power)
+	if ((u32)power == 0)
 		power = 1;

 	cpu_rq(cpu)->cpu_power = power;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ