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:   Mon, 8 May 2017 08:56:18 +0200
From:   Matias Bjørling <m@...rling.me>
To:     Geliang Tang <geliangtang@...il.com>,
        Matias Bjorling <mb@...htnvm.io>, Jens Axboe <axboe@...com>
Cc:     linux-block@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] lightnvm: fix error return code of memdup_user



On 05/06/2017 05:34 PM, Geliang Tang wrote:
> The error return code of memdup_user() should be -ENOMEM or -EFAULT.
> So this patch changed it to PTR_ERR(info).
>
> Signed-off-by: Geliang Tang <geliangtang@...il.com>
> ---
>  drivers/lightnvm/core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/core.c
> index 54a06c3..e8b5edd 100644
> --- a/drivers/lightnvm/core.c
> +++ b/drivers/lightnvm/core.c
> @@ -1164,7 +1164,7 @@ static long nvm_ioctl_info(struct file *file, void __user *arg)
>
>  	info = memdup_user(arg, sizeof(struct nvm_ioctl_info));
>  	if (IS_ERR(info))
> -		return -EFAULT;
> +		return PTR_ERR(info);
>
>  	info->version[0] = NVM_VERSION_MAJOR;
>  	info->version[1] = NVM_VERSION_MINOR;
>

Thanks Geliang. Jens, would you pick this beauty up? :)

Reviewed-by: Matias Bjørling <matias@...xlabs.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ