dect
/
linux-2.6
Archived
13
0
Fork 0

sched: nominate preferred wakeup cpu, fix

Andrew Morton reported:

> kernel/sched.c: In function 'schedule':
> kernel/sched.c:3679: warning: 'active_balance' may be used uninitialized in this function
>
> This warning is correct - the code is buggy.

In sched.c load_balance_newidle, there's real potential use of
uninitialised variable - fix it.

Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
Vaidyanathan Srinivasan 2008-12-20 10:06:38 +05:30 committed by Ingo Molnar
parent b77b881f21
commit 36dffab679
1 changed files with 1 additions and 1 deletions

View File

@ -3670,7 +3670,7 @@ redo:
}
if (!ld_moved) {
int active_balance;
int active_balance = 0;
schedstat_inc(sd, lb_failed[CPU_NEWLY_IDLE]);
if (!sd_idle && sd->flags & SD_SHARE_CPUPOWER &&