From: Terry Loftin <terry.loftin@hp.com>
To: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
Peter Zijlstra <peterz@infradead.org>
Cc: Bob Montgomery <bob.montgomery@hp.com>
Subject: [PATCH 1/2] sched: Fix "divide error: 0000" in find_busiest_group
Date: Tue, 19 Jul 2011 14:58:46 -0600 [thread overview]
Message-ID: <4E25F006.2010205@hp.com> (raw)
Correct the protection expression in update_cpu_power() to avoid setting
rq->cpu_power to zero.
Signed-off-by: Terry Loftin <terry.loftin@hp.com>
Signed-off-by: Bob Montgomery <bob.montgomery@hp.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;
next reply other threads:[~2011-07-19 20:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-19 20:58 Terry Loftin [this message]
2011-07-19 21:17 ` [PATCH 1/2] sched: Fix "divide error: 0000" in find_busiest_group Peter Zijlstra
2011-07-19 22:20 ` Terry Loftin
2011-07-19 22:30 ` Peter Zijlstra
2011-07-20 2:26 ` Mike Galbraith
2011-07-20 2:29 ` Peter Zijlstra
2011-07-20 3:32 ` Mike Galbraith
2011-09-01 17:16 ` Simon Kirby
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E25F006.2010205@hp.com \
--to=terry.loftin@hp.com \
--cc=bob.montgomery@hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox