summaryrefslogtreecommitdiffstats
path: root/kernel/cgroup
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2019-06-10 09:12:39 -0700
committerTejun Heo <tj@kernel.org>2019-06-10 09:12:39 -0700
commit11dc8b4011f50b0b207bc53d7882de04068360eb (patch)
treeca576a89b16483bd4480b4a6612f4cfec468e59d /kernel/cgroup
parenta5e112e6424adb77d953eac20e6936b952fd6b32 (diff)
parentc596687a008b579c503afb7a64fcacc7270fae9e (diff)
downloadlinux-11dc8b4011f50b0b207bc53d7882de04068360eb.tar.bz2
Merge branch 'for-5.2-fixes' into for-5.3
Diffstat (limited to 'kernel/cgroup')
-rw-r--r--kernel/cgroup/cgroup.c6
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);