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] [day] [month] [year] [list]
Date:   Tue, 27 Nov 2018 11:33:33 +0100
From:   Miklos Szeredi <miklos@...redi.hu>
To:     Jan Kara <jack@...e.cz>
Cc:     bianpan2016@....com, Al Viro <viro@...iv.linux.org.uk>,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V2] namei: free new_dentry late

On Tue, Nov 27, 2018 at 11:05 AM Jan Kara <jack@...e.cz> wrote:
>
> On Tue 27-11-18 17:57:12, PanBian wrote:

> > I am not quite sure about the actual execution logic. But I guess new_dentry
> > reference may be dropped outside vfs_rename in cocurrent executions.
> > Otherwise, there is no need to acquire & drop new_dentry reference as it
> > is always alive along vfs_rename.
>
> I don't think that's the case. The dget() - dput() pair just looks
> superfluous to me in vfs_rename(). Am I missing something Miklos?

I think those are to protect against d_delete() called from fs to
reset d_inode.  The caller indeed has to hold one ref anyway.

So not superfluous, but only needed due to d_delete() and not to
protect against freeing of dentry.

Thanks,
Miklos

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ