Commit 3c0c767
committed
anolis: Fix the bug that cfs_rq->h_nr_expel_immune underflow
ANBZ: torvalds#378
There are two stages in unthrottle_cfs_rq(), and in the second stage,
cfs_rq->h_nr_expel_immune wasn't updated, and it'll be less than the
actual value.
Once there is only expellee tasks on the cfs_rq, as
cfs_rq->h_nr_expel_immune isn't zero, expellee_only() will return false,
but pick_next_entity() will return NULL as expellee se are moved from
rb_tree to expel_list, which will result that set_next_entity() access
the NULL pointer and then panic.
This patch is to fix this problem.
Fixes: 2df6821("sched/fair: Fix unthrottle_cfs_rq() for leaf_cfs_rq list")
Signed-off-by: Cruz Zhao <CruzZhao@linux.alibaba.com>
Acked-by: Michael Wang <yun.wang@linux.alibaba.com>1 parent 87e3403 commit 3c0c767
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6085 | 6085 | | |
6086 | 6086 | | |
6087 | 6087 | | |
| 6088 | + | |
6088 | 6089 | | |
6089 | 6090 | | |
6090 | 6091 | | |
| |||
0 commit comments