From: Li Zefan <lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
To: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Sasha Levin <sasha.levin-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>,
LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
trinity-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH cgroup/for-3.11] cgroup: fix cgroupfs_root early destruction path
Date: Wed, 26 Jun 2013 17:14:03 +0800 [thread overview]
Message-ID: <51CAB0DB.5000706@huawei.com> (raw)
In-Reply-To: <20130626010454.GD30407-9pTldWuhBndy/B6EtB590w@public.gmane.org>
On 2013/6/26 9:04, Tejun Heo wrote:
> cgroupfs_root used to have ->actual_subsys_mask in addition to
> ->subsys_mask. a8a648c4ac ("cgroup: remove
> cgroup->actual_subsys_mask") removed it noting that the subsys_mask is
> essentially temporary and doesn't belong in cgroupfs_root; however,
> the patch made it impossible to tell whether a cgroupfs_root actually
> has the subsystems bound or just have the bits set leading to the
> following BUG when trying to mount with subsystems which are already
> mounted elsewhere.
>
> kernel BUG at kernel/cgroup.c:1038!
> invalid opcode: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
> ...
> CPU: 1 PID: 7973 Comm: mount Tainted: G W 3.10.0-rc7-next-20130625-sasha-00011-g1c1dc0e #1105
> task: ffff880fc0ae8000 ti: ffff880fc0b9a000 task.ti: ffff880fc0b9a000
> RIP: 0010:[<ffffffff81249b29>] [<ffffffff81249b29>] rebind_subsystems+0x409/0x5f0
> ...
> Call Trace:
> [<ffffffff8124bd4f>] cgroup_kill_sb+0xff/0x210
> [<ffffffff813d21af>] deactivate_locked_super+0x4f/0x90
> [<ffffffff8124f3b3>] cgroup_mount+0x673/0x6e0
> [<ffffffff81257169>] cpuset_mount+0xd9/0x110
> [<ffffffff813d2580>] mount_fs+0xb0/0x2d0
> [<ffffffff81404afd>] vfs_kern_mount+0xbd/0x180
> [<ffffffff814070b5>] do_new_mount+0x145/0x2c0
> [<ffffffff814085d6>] do_mount+0x356/0x3c0
> [<ffffffff8140873d>] SyS_mount+0xfd/0x140
> [<ffffffff854eb600>] tracesys+0xdd/0xe2
>
> We still want rebind_subsystems() to take added/removed masks, so
> let's fix it by marking whether a cgroupfs_root has finished binding
> or not. Also, document what's going on around ->subsys_mask
> initialization so that similar mistakes aren't repeated.
>
> Signed-off-by: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Reported-by: Sasha Levin <sasha.levin-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Acked-by: Li Zefan <lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
prev parent reply other threads:[~2013-06-26 9:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-25 17:20 cgroup: kernel BUG at kernel/cgroup.c:1038! Sasha Levin
[not found] ` <51C9D17B.5090208-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2013-06-26 1:04 ` [PATCH cgroup/for-3.11] cgroup: fix cgroupfs_root early destruction path Tejun Heo
2013-06-26 1:05 ` [PATCH cgroup/for-3.11] cgroup: grab cgroup_mutex in drop_parsed_module_refcounts() Tejun Heo
2013-06-26 9:12 ` Li Zefan
[not found] ` <20130626010521.GE30407-9pTldWuhBndy/B6EtB590w@public.gmane.org>
2013-06-26 17:50 ` Tejun Heo
[not found] ` <20130626175008.GF4405-9pTldWuhBndy/B6EtB590w@public.gmane.org>
2013-06-26 18:51 ` Sasha Levin
[not found] ` <20130626010454.GD30407-9pTldWuhBndy/B6EtB590w@public.gmane.org>
2013-06-26 9:14 ` Li Zefan [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=51CAB0DB.5000706@huawei.com \
--to=lizefan-hv44wf8li93qt0dzr+alfa@public.gmane.org \
--cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=sasha.levin-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
--cc=tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=trinity-u79uwXL29TY76Z2rM5mHXA@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;
as well as URLs for NNTP newsgroup(s).