diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c index 89dd464f6862bb93065bbca21794456b8e6bec70..ddde75bae7af68e5b917ae0c377d290342b200d6 100644 --- a/kernel/cgroup/cgroup.c +++ b/kernel/cgroup/cgroup.c @@ -4303,6 +4303,10 @@ struct task_struct *css_task_iter_next(struct css_task_iter *it) spin_lock_irq(&css_set_lock); + /* @it may be half-advanced by skips, finish advancing */ + if (it->flags & CSS_TASK_ITER_SKIPPED) + css_task_iter_advance(it); + if (it->task_pos) { it->cur_task = list_entry(it->task_pos, struct task_struct, cg_list);