lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171123153419.bdfot5y6dwbjqcry@dhcp22.suse.cz>
Date:   Thu, 23 Nov 2017 16:34:19 +0100
From:   Michal Hocko <mhocko@...nel.org>
To:     Al Viro <viro@...IV.linux.org.uk>
Cc:     Dave Chinner <david@...morbit.com>, Jan Kara <jack@...e.cz>,
        Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>,
        LKML <linux-kernel@...r.kernel.org>,
        linux-fsdevel@...r.kernel.org,
        Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH v2] fs: handle shrinker registration failure in
 sget_userns

On Thu 23-11-17 16:02:11, Michal Hocko wrote:
> On Thu 23-11-17 14:55:40, Al Viro wrote:
> > On Thu, Nov 23, 2017 at 03:35:37PM +0100, Michal Hocko wrote:
> > > Hopefully less screwed version.  But as I've said I am not really
> > > familiar with the code and do not feel competent to change it so please
> > > be very careful here. I've moved the shrinker registration to
> > > alloc_super which turned out to be simpler.
> > 
> > I don't get it.  Why the hell do we need all that PITA in the first place?
> > Just make sget_userns() end with
> > 	if (unlikely(regsiter_shrinker(&s->s_shrink) != 0)) {
> > 		deactivate_locked_super(s);
> > 		s = ERR_PTR(-ENOMEM);
> > 	}
> > 	return s;
> > and be done with that.  All there is to it...
> 
> Who is going to unregister that shrinker on other failure paths?

Scratch that. I've mixed destroy_unused_super with
deactivate_locked_super. Go with whatever works...
-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ