Re: [heads-up] buggered refcounting logics in cgroup1_mount()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jan 12, 2019 at 05:38:25AM +0000, Al Viro wrote:
> On Fri, Jan 11, 2019 at 12:54:51PM -0800, Tejun Heo wrote:
> > 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.
> 
> See vfs.git #fixes (the last two commits in there).  It seems to
> work here, but I don't have the CRIU regression tests, etc., so
> I would really appreciate if that thing got a real beating.

BTW, while kernfs_pin_sb() and struct kernfs_root ->supers definitely
ought to die, there's something else that might be killable with that
approach.  percpu_ref_reinit() has no users left after that, and,
as David Howells has observed, PERCPU_REF_INIT_DEAD is also unused.

Do we want to keep these two?



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux