Re: [PATCH][RFC] don't bother with path_get()/path_put() in unix_open_file()

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

 



On Sat, Jul 12, 2025 at 06:38:33AM +0000, Kuniyuki Iwashima wrote:
> From: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
> Date: Sat, 12 Jul 2025 06:41:57 +0100
> > Once unix_sock ->path is set, we are guaranteed that its ->path will remain
> > unchanged (and pinned) until the socket is closed.  OTOH, dentry_open()
> > does not modify the path passed to it.
> > 
> > IOW, there's no need to copy unix_sk(sk)->path in unix_open_file() - we
> > can just pass it to dentry_open() and be done with that.
> > 
> > Signed-off-by: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
> 
> Sounds good.  I confirmed vfs_open() copies the passed const path ptr.
> 
> Reviewed-by: Kuniyuki Iwashima <kuniyu@xxxxxxxxxx>

I can just throw that into the SCM_PIDFD branch?




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

  Powered by Linux