Files
twx-linux/kernel
Tejun Heo ab348285f7 cgroup: css_task_iter_skip()'d iterators must be advanced before accessed
commit cee0c33c54 upstream.

b636fd38dc ("cgroup: Implement css_task_iter_skip()") introduced
css_task_iter_skip() which is used to fix task iterations skipping
dying threadgroup leaders with live threads.  Skipping is implemented
as a subportion of full advancing but css_task_iter_next() forgot to
fully advance a skipped iterator before determining the next task to
visit causing it to return invalid task pointers.

Fix it by making css_task_iter_next() fully advance the iterator if it
has been skipped since the previous iteration.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: syzbot
Link: http://lkml.kernel.org/r/00000000000097025d058a7fd785@google.com
Fixes: b636fd38dc ("cgroup: Implement css_task_iter_skip()")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-09 17:53:36 +02:00
..
2019-07-31 07:28:25 +02:00
…
…
…
…
2019-05-31 06:47:25 -07:00
…
…
2018-08-03 07:50:38 +02:00
…
…
…
…
…
…
2018-08-03 07:50:22 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
2018-05-09 09:51:50 +02:00
…
…
…
…
…
…
…