cgroups.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Li Zefan <lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
Cc: Greg Kroah-Hartman
	<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
	LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Cgroups <cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] sysfs: fix namespace refcnt leak
Date: Thu, 20 Feb 2014 09:30:18 -0500	[thread overview]
Message-ID: <20140220143018.GE6897@htj.dyndns.org> (raw)
In-Reply-To: <53040B50.4060600-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>

Hello, Li.

On Wed, Feb 19, 2014 at 09:39:28AM +0800, Li Zefan wrote:
> > Can we make it optional so that users who don't care about it can
> > ignore it?
> 
> cgroupfs also needs this to fix refcnt leak.

Ah, okay.

> Because success in finding an existing cgroup_root doesn't mean no new
> superblock is needed. For example:
> 
>   # mount -t cgroup -o cpuacct xxx /cgroup
>   # mkdir /cgroup/tmp
>   # umount /cgroup    <--- sb will be freed but cgroup_root won't
> 
>   // this will allocate new sb, but we find the cgroup_root is there.
>   # mount -t cgroup -o cpuacct xxx /cgroup
> 
> But debugfs won't need this if it's converted to kernfs.
> 
> How about I keep kernfs_mount() API intact, and when this fix gets
> merged into mainline, you merge the fix into cgroup-next, and then
> I make a fix for cgroup by changing kernfs_mount()?

If we need kernfs_mount() modified anyway, let's do it in this patch.
I still think it'd be better to allow the parameter to be NULL but
other than that, no objection.

Thanks!

-- 
tejun

      parent reply	other threads:[~2014-02-20 14:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-17  3:54 [PATCH] sysfs: fix namespace refcnt leak Li Zefan
2014-02-18 23:12 ` Tejun Heo
     [not found]   ` <20140218231242.GJ31892-9pTldWuhBndy/B6EtB590w@public.gmane.org>
2014-02-19  1:39     ` Li Zefan
     [not found]       ` <53040B50.4060600-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2014-02-20 14:30         ` 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=20140220143018.GE6897@htj.dyndns.org \
    --to=tj-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@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;
as well as URLs for NNTP newsgroup(s).