diff options
author | Tejun Heo <tj@kernel.org> | 2019-06-10 18:12:39 +0200 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2019-06-10 18:12:39 +0200 |
commit | 11dc8b4011f50b0b207bc53d7882de04068360eb (patch) | |
tree | ca576a89b16483bd4480b4a6612f4cfec468e59d /kernel | |
parent | cgroup: add cgroup_parse_float() (diff) | |
parent | cgroup: Fix css_task_iter_advance_css_set() cset skip condition (diff) | |
download | linux-11dc8b4011f50b0b207bc53d7882de04068360eb.tar.xz linux-11dc8b4011f50b0b207bc53d7882de04068360eb.zip |
Merge branch 'for-5.2-fixes' into for-5.3
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/cgroup/cgroup.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c index 7dffcfe17441..9e3dffb09489 100644 --- a/kernel/cgroup/cgroup.c +++ b/kernel/cgroup/cgroup.c @@ -4401,7 +4401,7 @@ static void css_task_iter_advance_css_set(struct css_task_iter *it) it->task_pos = NULL; return; } - } while (!css_set_populated(cset) && !list_empty(&cset->dying_tasks)); + } while (!css_set_populated(cset) && list_empty(&cset->dying_tasks)); if (!list_empty(&cset->tasks)) it->task_pos = cset->tasks.next; @@ -4550,6 +4550,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); |