linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: Zefan Li <lizefan@huawei.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-fsdevel@vger.kernel.org
Subject: Re: [heads-up] buggered refcounting logics in cgroup1_mount()
Date: Fri, 11 Jan 2019 12:54:51 -0800	[thread overview]
Message-ID: <20190111205451.GX2509588@devbig004.ftw2.facebook.com> (raw)
In-Reply-To: <20190111072309.GT2217@ZenIV.linux.org.uk>

Hello, Al.

On Fri, Jan 11, 2019 at 07:23:09AM +0000, Al Viro wrote:
> 	AFAICS, a cleaner solution would be this:
> * to hell with kernfs_pin_sb(); just try to grab a reference to
> cgroup_root on reuse.
> * have cgroup_kill_sb() treat "it's already marked killed" as
> "just drop the reference, then".
> * after cgroup_do_mount() check if cgroup_root got marked killed and
> do deactivate_locked_super() in such case (with the same
> restart_syscall() failure exit).
> 
> 	Objections?  I would love to kill kernfs_pin_sb() as
> a followup (it's a fundamentally broken API), but that's not
> a stable fodder; some fix of refcounting bugs, OTOH, should be.

cgroup1 hierarchies have really weird set of requirements and the
implementation has always been somewhat broken.  I thought I fixed it
but obviously not.  I have no objection whatsoever and would much
appreciate the work.

Thanks a lot and happy new year!

-- 
tejun

  reply	other threads:[~2019-01-11 20:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-11  7:23 [heads-up] buggered refcounting logics in cgroup1_mount() Al Viro
2019-01-11 20:54 ` Tejun Heo [this message]
2019-01-12  5:38   ` Al Viro
2019-01-12 21:52     ` Al Viro
2019-01-15 15:26       ` Tejun Heo
2019-01-14  1:31   ` Zefan Li

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=20190111205451.GX2509588@devbig004.ftw2.facebook.com \
    --to=tj@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=lizefan@huawei.com \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    /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).