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: <YmhTFZ5zCGhWJOry@slm.duckdns.org>
Date:   Tue, 26 Apr 2022 10:16:21 -1000
From:   Tejun Heo <tj@...nel.org>
To:     Al Viro <viro@...iv.linux.org.uk>
Cc:     Imran Khan <imran.f.khan@...cle.com>, gregkh@...uxfoundation.org,
        ebiederm@...ssion.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v8 01/10] kernfs: Remove reference counting for
 kernfs_open_node.

On Tue, Apr 26, 2022 at 08:13:22PM +0000, Al Viro wrote:
> On Tue, Apr 26, 2022 at 08:29:21AM -1000, Tejun Heo wrote:
> 
> > The code is just wrong. You can end up:
> > 
> >         on = kn->attr.open;
> >         if (!on)
> >                 return;
> > 
> >         // we get preempted here and someone else puts @on and then
> >         // recreates it
> 
> Can't happen - the caller has guaranteed that no new openers will be
> coming.  Look at the call chain of kernfs_drain_open_files()...

Ah, okay. It can only transition to NULL from there. It's still a weird way
to go about it tho.

Thanks.

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ