From: Dave Jones <davej@codemonkey.org.uk>
To: Tejun Heo <tj@kernel.org>
Cc: Li Zefan <lizefan@huawei.com>,
Johannes Weiner <hannes@cmpxchg.org>,
cgroups@vger.kernel.org, linux-kernel@vger.kernel.org,
Daniel Wagner <daniel.wagner@bmw-carit.de>,
kernel-team@fb.com
Subject: Re: [PATCH cgroup/for-4.4-fixes] cgroup: make css_set pin its css's to avoid use-afer-free
Date: Mon, 23 Nov 2015 17:23:44 -0500 [thread overview]
Message-ID: <20151123222344.GA6117@codemonkey.org.uk> (raw)
In-Reply-To: <20151123195541.GA19072@mtj.duckdns.org>
On Mon, Nov 23, 2015 at 02:55:41PM -0500, Tejun Heo wrote:
> A css_set represents the relationship between a set of tasks and
> css's. css_set never pinned the associated css's. This was okay
> because tasks used to always disassociate immediately (in RCU sense) -
> either a task is moved to a different css_set or exits and never
> accesses css_set again.
>
> Unfortunately, afcf6c8b7544 ("cgroup: add cgroup_subsys->free() method
> and use it to fix pids controller") and patches leading up to it made
> a zombie hold onto its css_set and deref the associated css's on its
> release. Nothing pins the css's after exit and it might have already
> been freed leading to use-after-free.
>
> Fix it by making css_set pin the associate css's until its release.
This gets me booting again, thanks Tejun!
Dave
next prev parent reply other threads:[~2015-11-23 22:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-23 19:55 [PATCH cgroup/for-4.4-fixes] cgroup: make css_set pin its css's to avoid use-afer-free Tejun Heo
2015-11-23 22:23 ` Dave Jones [this message]
2015-11-24 10:31 ` Daniel Wagner
2015-11-24 14:44 ` Tejun Heo
2015-11-24 14:58 ` Daniel Wagner
2015-11-24 14:59 ` Tejun Heo
2015-11-30 22:42 ` [PATCH cgroup/for-4.4-fixes 1/2] cgroup_freezer: simplify propagation of CGROUP_FROZEN clearing in freezer_attach() Tejun Heo
2015-11-30 22:44 ` [PATCH cgroup/for-4.4-fixes 2/3] cgroup: fix handling of multi-destination migration from subtree_control enabling Tejun Heo
2015-12-01 7:02 ` Daniel Wagner
2015-12-01 16:44 ` Tejun Heo
2015-12-02 6:22 ` Daniel Wagner
2015-12-03 15:16 ` Tejun Heo
2015-12-03 15:38 ` Tejun Heo
2015-11-30 14:48 ` [PATCH cgroup/for-4.4-fixes] cgroup: make css_set pin its css's to avoid use-afer-free Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151123222344.GA6117@codemonkey.org.uk \
--to=davej@codemonkey.org.uk \
--cc=cgroups@vger.kernel.org \
--cc=daniel.wagner@bmw-carit.de \
--cc=hannes@cmpxchg.org \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox