* [PATCH -next] firmware: imx: scu: Fix possible memory leak in imx_scu_probe()
@ 2020-05-06 5:14 ` Wei Yongjun
0 siblings, 0 replies; 9+ messages in thread
From: Wei Yongjun @ 2020-05-06 5:14 UTC (permalink / raw)
To: Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
NXP Linux Team, Dong Aisheng
Cc: Wei Yongjun, linux-arm-kernel, linux-kernel, kernel-janitors
'chan_name' is malloced in imx_scu_probe() and should be freed
before leaving from the error handling cases, otherwise it will
cause memory leak.
Fixes: edbee095fafb ("firmware: imx: add SCU firmware driver support")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/firmware/imx/imx-scu.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/firmware/imx/imx-scu.c b/drivers/firmware/imx/imx-scu.c
index b3da2e193ad2..176ddd151375 100644
--- a/drivers/firmware/imx/imx-scu.c
+++ b/drivers/firmware/imx/imx-scu.c
@@ -314,6 +314,7 @@ static int imx_scu_probe(struct platform_device *pdev)
if (ret != -EPROBE_DEFER)
dev_err(dev, "Failed to request mbox chan %s ret %d\n",
chan_name, ret);
+ kfree(chan_name);
return ret;
}
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH -next] firmware: imx: scu: Fix possible memory leak in imx_scu_probe()
@ 2020-05-06 5:14 ` Wei Yongjun
0 siblings, 0 replies; 9+ messages in thread
From: Wei Yongjun @ 2020-05-06 5:14 UTC (permalink / raw)
To: Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
NXP Linux Team, Dong Aisheng
Cc: kernel-janitors, Wei Yongjun, linux-kernel, linux-arm-kernel
'chan_name' is malloced in imx_scu_probe() and should be freed
before leaving from the error handling cases, otherwise it will
cause memory leak.
Fixes: edbee095fafb ("firmware: imx: add SCU firmware driver support")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/firmware/imx/imx-scu.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/firmware/imx/imx-scu.c b/drivers/firmware/imx/imx-scu.c
index b3da2e193ad2..176ddd151375 100644
--- a/drivers/firmware/imx/imx-scu.c
+++ b/drivers/firmware/imx/imx-scu.c
@@ -314,6 +314,7 @@ static int imx_scu_probe(struct platform_device *pdev)
if (ret != -EPROBE_DEFER)
dev_err(dev, "Failed to request mbox chan %s ret %d\n",
chan_name, ret);
+ kfree(chan_name);
return ret;
}
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH -next] firmware: imx: scu: Fix possible memory leak in imx_scu_probe()
@ 2020-05-06 5:14 ` Wei Yongjun
0 siblings, 0 replies; 9+ messages in thread
From: Wei Yongjun @ 2020-05-06 5:14 UTC (permalink / raw)
To: Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
NXP Linux Team, Dong Aisheng
Cc: kernel-janitors, Wei Yongjun, linux-kernel, linux-arm-kernel
'chan_name' is malloced in imx_scu_probe() and should be freed
before leaving from the error handling cases, otherwise it will
cause memory leak.
Fixes: edbee095fafb ("firmware: imx: add SCU firmware driver support")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/firmware/imx/imx-scu.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/firmware/imx/imx-scu.c b/drivers/firmware/imx/imx-scu.c
index b3da2e193ad2..176ddd151375 100644
--- a/drivers/firmware/imx/imx-scu.c
+++ b/drivers/firmware/imx/imx-scu.c
@@ -314,6 +314,7 @@ static int imx_scu_probe(struct platform_device *pdev)
if (ret != -EPROBE_DEFER)
dev_err(dev, "Failed to request mbox chan %s ret %d\n",
chan_name, ret);
+ kfree(chan_name);
return ret;
}
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 9+ messages in thread
* RE: [PATCH -next] firmware: imx: scu: Fix possible memory leak in imx_scu_probe()
2020-05-06 5:14 ` Wei Yongjun
(?)
@ 2020-05-06 11:02 ` Aisheng Dong
-1 siblings, 0 replies; 9+ messages in thread
From: Aisheng Dong @ 2020-05-06 11:02 UTC (permalink / raw)
To: Wei Yongjun, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, dl-linux-imx
Cc: linux-arm-kernel, linux-kernel, kernel-janitors
> From: Wei Yongjun <weiyongjun1@huawei.com>
> Sent: Wednesday, May 6, 2020 1:14 PM
>
> 'chan_name' is malloced in imx_scu_probe() and should be freed before leaving
> from the error handling cases, otherwise it will cause memory leak.
>
> Fixes: edbee095fafb ("firmware: imx: add SCU firmware driver support")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Thanks for the fix.
Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
Regards
Aisheng
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [PATCH -next] firmware: imx: scu: Fix possible memory leak in imx_scu_probe()
@ 2020-05-06 11:02 ` Aisheng Dong
0 siblings, 0 replies; 9+ messages in thread
From: Aisheng Dong @ 2020-05-06 11:02 UTC (permalink / raw)
To: Wei Yongjun, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, dl-linux-imx
Cc: kernel-janitors, linux-kernel, linux-arm-kernel
PiBGcm9tOiBXZWkgWW9uZ2p1biA8d2VpeW9uZ2p1bjFAaHVhd2VpLmNvbT4NCj4gU2VudDogV2Vk
bmVzZGF5LCBNYXkgNiwgMjAyMCAxOjE0IFBNDQo+IA0KPiAnY2hhbl9uYW1lJyBpcyBtYWxsb2Nl
ZCBpbiBpbXhfc2N1X3Byb2JlKCkgYW5kIHNob3VsZCBiZSBmcmVlZCBiZWZvcmUgbGVhdmluZw0K
PiBmcm9tIHRoZSBlcnJvciBoYW5kbGluZyBjYXNlcywgb3RoZXJ3aXNlIGl0IHdpbGwgY2F1c2Ug
bWVtb3J5IGxlYWsuDQo+IA0KPiBGaXhlczogZWRiZWUwOTVmYWZiICgiZmlybXdhcmU6IGlteDog
YWRkIFNDVSBmaXJtd2FyZSBkcml2ZXIgc3VwcG9ydCIpDQo+IFNpZ25lZC1vZmYtYnk6IFdlaSBZ
b25nanVuIDx3ZWl5b25nanVuMUBodWF3ZWkuY29tPg0KDQpUaGFua3MgZm9yIHRoZSBmaXguDQpS
ZXZpZXdlZC1ieTogRG9uZyBBaXNoZW5nIDxhaXNoZW5nLmRvbmdAbnhwLmNvbT4NCg0KUmVnYXJk
cw0KQWlzaGVuZw0K
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [PATCH -next] firmware: imx: scu: Fix possible memory leak in imx_scu_probe()
@ 2020-05-06 11:02 ` Aisheng Dong
0 siblings, 0 replies; 9+ messages in thread
From: Aisheng Dong @ 2020-05-06 11:02 UTC (permalink / raw)
To: Wei Yongjun, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, dl-linux-imx
Cc: kernel-janitors, linux-kernel, linux-arm-kernel
> From: Wei Yongjun <weiyongjun1@huawei.com>
> Sent: Wednesday, May 6, 2020 1:14 PM
>
> 'chan_name' is malloced in imx_scu_probe() and should be freed before leaving
> from the error handling cases, otherwise it will cause memory leak.
>
> Fixes: edbee095fafb ("firmware: imx: add SCU firmware driver support")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Thanks for the fix.
Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
Regards
Aisheng
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH -next] firmware: imx: scu: Fix possible memory leak in imx_scu_probe()
2020-05-06 5:14 ` Wei Yongjun
(?)
@ 2020-05-20 1:15 ` Shawn Guo
-1 siblings, 0 replies; 9+ messages in thread
From: Shawn Guo @ 2020-05-20 1:15 UTC (permalink / raw)
To: Wei Yongjun
Cc: Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
NXP Linux Team, Dong Aisheng, linux-arm-kernel, linux-kernel,
kernel-janitors
On Wed, May 06, 2020 at 05:14:10AM +0000, Wei Yongjun wrote:
> 'chan_name' is malloced in imx_scu_probe() and should be freed
> before leaving from the error handling cases, otherwise it will
> cause memory leak.
>
> Fixes: edbee095fafb ("firmware: imx: add SCU firmware driver support")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH -next] firmware: imx: scu: Fix possible memory leak in imx_scu_probe()
@ 2020-05-20 1:15 ` Shawn Guo
0 siblings, 0 replies; 9+ messages in thread
From: Shawn Guo @ 2020-05-20 1:15 UTC (permalink / raw)
To: Wei Yongjun
Cc: Dong Aisheng, Sascha Hauer, kernel-janitors, linux-kernel,
NXP Linux Team, Pengutronix Kernel Team, Fabio Estevam,
linux-arm-kernel
On Wed, May 06, 2020 at 05:14:10AM +0000, Wei Yongjun wrote:
> 'chan_name' is malloced in imx_scu_probe() and should be freed
> before leaving from the error handling cases, otherwise it will
> cause memory leak.
>
> Fixes: edbee095fafb ("firmware: imx: add SCU firmware driver support")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH -next] firmware: imx: scu: Fix possible memory leak in imx_scu_probe()
@ 2020-05-20 1:15 ` Shawn Guo
0 siblings, 0 replies; 9+ messages in thread
From: Shawn Guo @ 2020-05-20 1:15 UTC (permalink / raw)
To: Wei Yongjun
Cc: Dong Aisheng, Sascha Hauer, kernel-janitors, linux-kernel,
NXP Linux Team, Pengutronix Kernel Team, Fabio Estevam,
linux-arm-kernel
On Wed, May 06, 2020 at 05:14:10AM +0000, Wei Yongjun wrote:
> 'chan_name' is malloced in imx_scu_probe() and should be freed
> before leaving from the error handling cases, otherwise it will
> cause memory leak.
>
> Fixes: edbee095fafb ("firmware: imx: add SCU firmware driver support")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Applied, thanks.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2020-05-20 1:16 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-06 5:14 [PATCH -next] firmware: imx: scu: Fix possible memory leak in imx_scu_probe() Wei Yongjun
2020-05-06 5:14 ` Wei Yongjun
2020-05-06 5:14 ` Wei Yongjun
2020-05-06 11:02 ` Aisheng Dong
2020-05-06 11:02 ` Aisheng Dong
2020-05-06 11:02 ` Aisheng Dong
2020-05-20 1:15 ` Shawn Guo
2020-05-20 1:15 ` Shawn Guo
2020-05-20 1:15 ` Shawn Guo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.