From: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Li Zefan <lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
Cc: LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Cgroups <cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] cgroup: fix use-after-free when umounting cgroupfs
Date: Fri, 26 Apr 2013 11:59:23 -0700 [thread overview]
Message-ID: <20130426185923.GA1433@mtj.dyndns.org> (raw)
In-Reply-To: <5179EC53.6080006-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
On Fri, Apr 26, 2013 at 10:54:11AM +0800, Li Zefan wrote:
> Try:
> # mount -t cgroup xxx /cgroup
> # mkdir /cgroup/sub && rmdir /cgroup/sub && umount /cgroup
>
> And you might see this:
>
> ida_remove called for id=1 which is not allocated.
>
> It's because cgroup_kill_sb() is called to destroy root->cgroup_ida
> and free cgrp->root before ida_simple_removed() is called. What's
> worse is we're accessing cgrp->root while it has been freed.
>
> Signed-off-by: Li Zefan <lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
Applied to cgroup/for-3.10.
Thanks.
--
tejun
prev parent reply other threads:[~2013-04-26 18:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-26 2:54 [PATCH] cgroup: fix use-after-free when umounting cgroupfs Li Zefan
[not found] ` <5179EC53.6080006-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2013-04-26 18:59 ` Tejun Heo [this message]
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=20130426185923.GA1433@mtj.dyndns.org \
--to=tj-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.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