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:   Thu, 3 Jan 2019 12:48:32 +0800
From:   Xiubo Li <xiubli@...hat.com>
To:     liujian <liujian56@...wei.com>, gregkh@...uxfoundation.org
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] driver: uio: fix possible memory leak in uio_open

On 2019/1/3 22:28, liujian wrote:
> Fixes: 57c5f4df0a5a ("uio: fix crash after the device is unregistered")
> Signed-off-by: liujian <liujian56@...wei.com>
> ---
> v1->v2:
> rename the "err_infoopen" to "err_idev_info"
> v2->3:
> put the extra info after the "--"

Looks good to me.

Thanks.
BRs


>   drivers/uio/uio.c | 7 ++++---
>   1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c
> index 5c10fc7..aab3520 100644
> --- a/drivers/uio/uio.c
> +++ b/drivers/uio/uio.c
> @@ -496,18 +496,19 @@ static int uio_open(struct inode *inode, struct file *filep)
>   	if (!idev->info) {
>   		mutex_unlock(&idev->info_lock);
>   		ret = -EINVAL;
> -		goto err_alloc_listener;
> +		goto err_idev_info;
>   	}
>   
>   	if (idev->info && idev->info->open)
>   		ret = idev->info->open(idev->info, inode);
>   	mutex_unlock(&idev->info_lock);
>   	if (ret)
> -		goto err_infoopen;
> +		goto err_idev_info;
>   
>   	return 0;
>   
> -err_infoopen:
> +err_idev_info:
> +	filep->private_data = NULL;
>   	kfree(listener);
>   
>   err_alloc_listener:


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ