summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorSrivatsa Vaddagiri <vatsa@codeaurora.org>2014-08-25 10:36:57 +0530
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:00:31 -0700
commitb7f98009c52997a421dbd70ea2cdedc4d1e8d55d (patch)
tree122c526d607e4cd00aa25c254f80116cd143b76a /kernel
parent84d1fa51ee918a238863add2036e230dcd8e9f37 (diff)
sched: Initialize env->loop variable to 0
load_balance() function does not explicitly initialize env->loop variable to 0. As a result, there is a vague possibility of move_tasks() hitting a very long (unnecessary) loop when its unable to move tasks from src_cpu. This can lead to unpleasant results like a watchdog bark. Fix this by explicitly initializing env->loop variable to 0 (in both load_balance() and active_load_balance_cpu_stop()). Change-Id: I36b84c91a9753870fa16ef9c9339db7b706527be Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched/fair.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index d7261eed1383..e6b670ab1e1d 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -8230,6 +8230,7 @@ static int load_balance(int this_cpu, struct rq *this_rq,
.tasks = LIST_HEAD_INIT(env.tasks),
.imbalance = 0,
.flags = 0,
+ .loop = 0,
};
/*
@@ -8680,6 +8681,7 @@ static int active_load_balance_cpu_stop(void *data)
.src_rq = busiest_rq,
.idle = CPU_IDLE,
.flags = 0,
+ .loop = 0,
};
raw_spin_lock_irq(&busiest_rq->lock);