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:   Wed, 2 Jan 2019 06:55:54 +0000
From:   "liujian (CE)" <liujian56@...wei.com>
To:     Xiubo Li <xiubli@...hat.com>
CC:     "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "liujian (CE)" <liujian56@...wei.com>
Subject: RE: [PATCH] driver: uio: fix possible memory leak in uio_open





> -----Original Message-----
> From: linux-kernel-owner@...r.kernel.org
> [mailto:linux-kernel-owner@...r.kernel.org] On Behalf Of Xiubo Li
> Sent: Wednesday, January 02, 2019 2:37 PM
> To: liujian (CE) <liujian56@...wei.com>
> Cc: gregkh@...uxfoundation.org; linux-kernel@...r.kernel.org
> Subject: Re: [PATCH] driver: uio: fix possible memory leak in uio_open
> 
> On 2019/1/3 0:26, liujian wrote:
> > Fixes: 57c5f4df0a5a ("uio: fix crash after the device is
> > unregistered")
> > Signed-off-by: liujian <liujian56@...wei.com>
> > ---
> >   drivers/uio/uio.c | 3 ++-
> >   1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c index
> > 5c10fc7..bde7d7a 100644
> > --- a/drivers/uio/uio.c
> > +++ b/drivers/uio/uio.c
> > @@ -496,7 +496,7 @@ 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_infoopen;
> >   	}
> >
> >   	if (idev->info && idev->info->open) @@ -508,6 +508,7 @@ static int
> > uio_open(struct inode *inode, struct file *filep)
> >   	return 0;
> >
> >   err_infoopen:
> 
> Maybe we should rename the "err_infoopen" to something like
> "err_idev_info"...
> 
Yes, it's better to change this, I will send v2, thank you~

Best Regards,
liujian

> Thanks.
> 
> BRs
> 
> > +	filep->private_data = NULL;
> >   	kfree(listener);
> >
> >   err_alloc_listener:
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ