From d7b0bec53b464854c43f9b0b8e29578c7f7418ac Mon Sep 17 00:00:00 2001 From: Dietmar Eggemann Date: Sun, 4 Dec 2016 17:29:34 +0000 Subject: [PATCH] Fixup!: sched/fair.c: Set SchedTune specific struct energy_env.task 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 (cherry picked from commit 14531d4e245d063f713ee5ed835df958e6c7838f) Signed-off-by: Chris Redpath --- kernel/sched/fair.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index c4d9d8bf8d1f..ae3cc8df331c 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -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); -- 2.34.1