* Re: [PATCH v3] driver: uio: fix possible memory leak in uio_open
2019-01-03 14:28 [PATCH v3] driver: uio: fix possible memory leak in uio_open liujian
@ 2019-01-03 4:48 ` Xiubo Li
2019-01-07 16:13 ` Greg KH
1 sibling, 0 replies; 4+ messages in thread
From: Xiubo Li @ 2019-01-03 4:48 UTC (permalink / raw)
To: liujian, gregkh; +Cc: linux-kernel
On 2019/1/3 22:28, liujian wrote:
> Fixes: 57c5f4df0a5a ("uio: fix crash after the device is unregistered")
> Signed-off-by: liujian <liujian56@huawei.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:
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v3] driver: uio: fix possible memory leak in uio_open
@ 2019-01-03 14:28 liujian
2019-01-03 4:48 ` Xiubo Li
2019-01-07 16:13 ` Greg KH
0 siblings, 2 replies; 4+ messages in thread
From: liujian @ 2019-01-03 14:28 UTC (permalink / raw)
To: gregkh; +Cc: xiubli, liujian56, linux-kernel
Fixes: 57c5f4df0a5a ("uio: fix crash after the device is unregistered")
Signed-off-by: liujian <liujian56@huawei.com>
---
v1->v2:
rename the "err_infoopen" to "err_idev_info"
v2->3:
put the extra info after the "--"
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:
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v3] driver: uio: fix possible memory leak in uio_open
2019-01-03 14:28 [PATCH v3] driver: uio: fix possible memory leak in uio_open liujian
2019-01-03 4:48 ` Xiubo Li
@ 2019-01-07 16:13 ` Greg KH
2019-01-08 3:30 ` liujian (CE)
1 sibling, 1 reply; 4+ messages in thread
From: Greg KH @ 2019-01-07 16:13 UTC (permalink / raw)
To: liujian; +Cc: xiubli, linux-kernel
On Thu, Jan 03, 2019 at 10:28:22PM +0800, liujian wrote:
> Fixes: 57c5f4df0a5a ("uio: fix crash after the device is unregistered")
> Signed-off-by: liujian <liujian56@huawei.com>
I can not take patches without any changelog text at all :(
Also, is "liujian" your full name? We need a real and full name for a
signed-off-by line.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH v3] driver: uio: fix possible memory leak in uio_open
2019-01-07 16:13 ` Greg KH
@ 2019-01-08 3:30 ` liujian (CE)
0 siblings, 0 replies; 4+ messages in thread
From: liujian (CE) @ 2019-01-08 3:30 UTC (permalink / raw)
To: Greg KH; +Cc: xiubli, linux-kernel
> -----Original Message-----
> From: Greg KH [mailto:gregkh@linuxfoundation.org]
> Sent: Tuesday, January 08, 2019 12:14 AM
> To: liujian (CE) <liujian56@huawei.com>
> Cc: xiubli@redhat.com; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH v3] driver: uio: fix possible memory leak in uio_open
>
> On Thu, Jan 03, 2019 at 10:28:22PM +0800, liujian wrote:
> > Fixes: 57c5f4df0a5a ("uio: fix crash after the device is
> > unregistered")
> > Signed-off-by: liujian <liujian56@huawei.com>
>
>
> I can not take patches without any changelog text at all :(
I am sorry, I will resend the patch~
>
> Also, is "liujian" your full name? We need a real and full name for a
> signed-off-by line.
Yes, but as someone do, I may need change 'liujian' to 'Liu Jian'
Thanks
> thanks,
>
> greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-01-08 3:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-03 14:28 [PATCH v3] driver: uio: fix possible memory leak in uio_open liujian
2019-01-03 4:48 ` Xiubo Li
2019-01-07 16:13 ` Greg KH
2019-01-08 3:30 ` liujian (CE)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).