Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1314541
| From | Tejun Heo <tj@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/2] cgroup: make sure a parent css isn't offlined before its children |
| Date | 2016-01-21 22:30 +0100 |
| Message-ID | <qTuXM-2zU-13@gated-at.bofh.it> (permalink) |
| References | <qQOgi-6eV-7@gated-at.bofh.it> <qQWdP-3jT-7@gated-at.bofh.it> <qR79g-2OU-11@gated-at.bofh.it> <qTubq-1Zs-35@gated-at.bofh.it> <qTuXM-2zU-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Jan 21, 2016 at 10:24:16PM +0100, Peter Zijlstra wrote: > On Thu, Jan 21, 2016 at 03:31:11PM -0500, Tejun Heo wrote: > > There are three subsystem callbacks in css shutdown path - > > css_offline(), css_released() and css_free(). Except for > > css_released(), cgroup core didn't use to guarantee the order of > > invocation. css_offline() or css_free() could be called on a parent > > css before its children. This behavior is unexpected and led to > > use-after-free in cpu controller. > > > > This patch updates offline path so that a parent css is never offlined > > before its children. Each css keeps online_cnt which reaches zero iff > > itself and all its children are offline and offline_css() is invoked > > only after online_cnt reaches zero. > > > > This fixes the reported cpu controller malfunction. The next patch > > will update css_free() handling. > > No, I need to fix the cpu controller too, because the offending code > sits off of css_free() (the next patch), but also does a call_rcu() in > between, which also doesn't guarantee order. Ah, I see. Christian, can you please apply all three patches and see whether the problem gets fixed? Once verified, I'll update the patch description and repost. Thanks. -- tejun
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/2] cgroup: make sure a parent css isn't offlined before its children Tejun Heo <tj@kernel.org> - 2016-01-21 21:40 +0100
[PATCH 2/2] cgroup: make sure a parent css isn't freed before its children Tejun Heo <tj@kernel.org> - 2016-01-21 21:40 +0100
[PATCH v2 2/2] cgroup: make sure a parent css isn't freed before its children Tejun Heo <tj@kernel.org> - 2016-01-22 16:50 +0100
Re: [PATCH 1/2] cgroup: make sure a parent css isn't offlined before its children Tejun Heo <tj@kernel.org> - 2016-01-21 22:30 +0100
Re: [PATCH 1/2] cgroup: make sure a parent css isn't offlined before its children Christian Borntraeger <borntraeger@de.ibm.com> - 2016-01-22 09:20 +0100
Re: [PATCH 1/2] cgroup: make sure a parent css isn't offlined before its children Peter Zijlstra <peterz@infradead.org> - 2016-01-21 22:30 +0100
[PATCH v2 1/2] cgroup: make sure a parent css isn't offlined before its children Tejun Heo <tj@kernel.org> - 2016-01-22 16:50 +0100
csiph-web