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]
Date:   Fri, 5 May 2023 10:22:09 +0200
From:   Christian König <christian.koenig@....com>
To:     ye.xingchen@....com.cn, sumit.semwal@...aro.org
Cc:     gustavo@...ovan.org, linux-media@...r.kernel.org,
        dri-devel@...ts.freedesktop.org, linaro-mm-sig@...ts.linaro.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] dma-buf/sync_file: Use fdget()

Am 05.05.23 um 05:03 schrieb ye.xingchen@....com.cn:
> From: Ye Xingchen <ye.xingchen@....com.cn>
>
> convert the fget() use to fdget().

Well the rational is missing. Why should we do that?

Christian.

>
> Signed-off-by: Ye Xingchen <ye.xingchen@....com.cn>
> ---
>   drivers/dma-buf/sync_file.c | 10 +++++-----
>   1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/dma-buf/sync_file.c b/drivers/dma-buf/sync_file.c
> index af57799c86ce..222b13b1bdb8 100644
> --- a/drivers/dma-buf/sync_file.c
> +++ b/drivers/dma-buf/sync_file.c
> @@ -78,18 +78,18 @@ EXPORT_SYMBOL(sync_file_create);
>
>   static struct sync_file *sync_file_fdget(int fd)
>   {
> -	struct file *file = fget(fd);
> +	struct struct fd f = fdget(fd);
>
> -	if (!file)
> +	if (!f.file)
>   		return NULL;
>
> -	if (file->f_op != &sync_file_fops)
> +	if (f.file->f_op != &sync_file_fops)
>   		goto err;
>
> -	return file->private_data;
> +	return f.file->private_data;
>
>   err:
> -	fput(file);
> +	fdput(f);
>   	return NULL;
>   }
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ