Fixup!: sched/fair.c: Set SchedTune specific struct energy_env.task
authorDietmar Eggemann <dietmar.eggemann@arm.com>
Sun, 4 Dec 2016 17:29:34 +0000 (17:29 +0000)
committerAmit Pundir <amit.pundir@linaro.org>
Wed, 21 Jun 2017 11:07:28 +0000 (16:37 +0530)
This has to be done in the caller function of energy_diff() version of
SchedTune to avoid Null pointer dereference in energy_diff().

Change-Id: I3f0f68dbd11efb15bbb3b1832f8294419ed85241
Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
(cherry picked from commit 14531d4e245d063f713ee5ed835df958e6c7838f)
Signed-off-by: Chris Redpath <chris.redpath@arm.com>
kernel/sched/fair.c

index c4d9d8bf8d1f3bec9a566bf1bb8ffc1c07fd6c47..ae3cc8df331c5a681a8ffc5b482ba9f4bc54cf85 100644 (file)
@@ -5911,6 +5911,7 @@ static int select_energy_cpu_brute(struct task_struct *p, int prev_cpu)
                        .util_delta     = task_util(p),
                        .src_cpu        = prev_cpu,
                        .dst_cpu        = i,
+                       .task           = p,
                };
 
                spare = capacity_spare_wake(i, p);