sched/fair: Fix incorrect CPU access in check_for_migration()
Commit 3a94de0b ("sched/fair: Prevent tick path active migration to the same CPU") removed the -1 check for the return value of find_energy_efficient_cpu() while adding the check against the previous CPU. If the new CPU is -1, then it passes the check of new_cpu != prev_cpu and end up calling capacity_orig_of() with -1 as an argument. Fix this issue by adding the -1 check again. Change-Id: I6768ef722f25885f97583e493a6753b5e3fe28ee Signed-off-by:Pavankumar Kondeti <pkondeti@codeaurora.org>
Loading
Please register or sign in to comment