Re: [PATCH 3/3] namei: Standardize callers of filename_create()

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

 



On Wed, Sep 01, 2021 at 10:51:43AM -0700, Stephen Brennan wrote:
>  inline struct dentry *user_path_create(int dfd, const char __user *pathname,
>  				struct path *path, unsigned int lookup_flags)
>  {
> -	return filename_create(dfd, getname(pathname), path, lookup_flags);
> +	struct filename *filename;
> +	struct dentry *dentry;
> +
> +	filename = getname(pathname);
> +	dentry = filename_create(dfd, getname(pathname), path, lookup_flags);
> +	putname(filename);
> +	return dentry;

Leaks, obviously...



[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