sched/core: Fix null-pointer dereference
Turning on sched_use_pelt causes a null-pointer dereference in scheduler. Add correct checking of varable. CRs-fixed: 1042656 Change-Id: I6e6a57e24b41e4b3d049bfcf694b9ad7e2144dd5 Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
This commit is contained in:
parent
4e24c748ee
commit
e3473cacaa
1 changed files with 1 additions and 1 deletions
|
@ -4343,7 +4343,7 @@ __update_load_avg(u64 now, int cpu, struct sched_avg *sa,
|
|||
return 0;
|
||||
sa->last_update_time = now;
|
||||
|
||||
if (sched_use_pelt && !cfs_rq && weight) {
|
||||
if (sched_use_pelt && cfs_rq && weight) {
|
||||
se = container_of(sa, struct sched_entity, avg);
|
||||
if (entity_is_task(se) && se->on_rq)
|
||||
dec_hmp_sched_stats_fair(rq_of(cfs_rq), task_of(se));
|
||||
|
|
Loading…
Add table
Reference in a new issue