Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit de22a05e authored by Pavankumar Kondeti's avatar Pavankumar Kondeti
Browse files

sched/fair: fix array out of bounds access in select_energy_cpu_idx()



We are using an incorrect index while initializing the nrg_delta for
the previous CPU in select_energy_cpu_idx(). This initialization
it self is not needed as the nrg_delta for the previous CPU is already
initialized to 0 while preparing the energ_env struct.

Change-Id: Iee4e2c62f904050d2680a0a1df646d4d515c62cc
Signed-off-by: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
parent f9641207
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -5879,7 +5879,6 @@ static inline int select_energy_cpu_idx(struct energy_env *eenv)
	 * efficient, with a 0 energy variation.
	 */
	eenv->next_idx = EAS_CPU_PRV;
	eenv->cpu[cpu_idx].nrg_delta = 0;

	/*
	 * Compare the other CPU candidates to find a CPU which can be