* [PATCH v2] remoteproc: mtk_scp: Fix a potential double free
@ 2022-04-09 6:27 Christophe JAILLET
2022-04-11 8:55 ` AngeloGioacchino Del Regno
0 siblings, 1 reply; 3+ messages in thread
From: Christophe JAILLET @ 2022-04-09 6:27 UTC (permalink / raw)
To: angelogioacchino.delregno, Bjorn Andersson, Mathieu Poirier,
Matthias Brugger
Cc: linux-kernel, kernel-janitors, Christophe JAILLET,
linux-remoteproc, linux-arm-kernel, linux-mediatek
'scp->rproc' is allocated using devm_rproc_alloc(), so there is no need
to free it explicitly in the remove function.
Fixes: c1407ac1099a ("remoteproc: mtk_scp: Use devm variant of rproc_alloc()")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
v1 -> v2:
- add missing Signed-off-by
---
drivers/remoteproc/mtk_scp.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c
index 38609153bf64..4a0e6c4bc6f4 100644
--- a/drivers/remoteproc/mtk_scp.c
+++ b/drivers/remoteproc/mtk_scp.c
@@ -877,7 +877,6 @@ static int scp_remove(struct platform_device *pdev)
for (i = 0; i < SCP_IPI_MAX; i++)
mutex_destroy(&scp->ipi_desc[i].lock);
mutex_destroy(&scp->send_lock);
- rproc_free(scp->rproc);
return 0;
}
--
2.32.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] remoteproc: mtk_scp: Fix a potential double free
2022-04-09 6:27 [PATCH v2] remoteproc: mtk_scp: Fix a potential double free Christophe JAILLET
@ 2022-04-11 8:55 ` AngeloGioacchino Del Regno
2022-04-12 17:04 ` Mathieu Poirier
0 siblings, 1 reply; 3+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-04-11 8:55 UTC (permalink / raw)
To: Christophe JAILLET, Bjorn Andersson, Mathieu Poirier, Matthias Brugger
Cc: linux-kernel, kernel-janitors, linux-remoteproc,
linux-arm-kernel, linux-mediatek
Il 09/04/22 08:27, Christophe JAILLET ha scritto:
> 'scp->rproc' is allocated using devm_rproc_alloc(), so there is no need
> to free it explicitly in the remove function.
>
> Fixes: c1407ac1099a ("remoteproc: mtk_scp: Use devm variant of rproc_alloc()")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] remoteproc: mtk_scp: Fix a potential double free
2022-04-11 8:55 ` AngeloGioacchino Del Regno
@ 2022-04-12 17:04 ` Mathieu Poirier
0 siblings, 0 replies; 3+ messages in thread
From: Mathieu Poirier @ 2022-04-12 17:04 UTC (permalink / raw)
To: AngeloGioacchino Del Regno
Cc: Christophe JAILLET, Bjorn Andersson, Matthias Brugger,
linux-kernel, kernel-janitors, linux-remoteproc,
linux-arm-kernel, linux-mediatek
On Mon, Apr 11, 2022 at 10:55:52AM +0200, AngeloGioacchino Del Regno wrote:
> Il 09/04/22 08:27, Christophe JAILLET ha scritto:
> > 'scp->rproc' is allocated using devm_rproc_alloc(), so there is no need
> > to free it explicitly in the remove function.
> >
> > Fixes: c1407ac1099a ("remoteproc: mtk_scp: Use devm variant of rproc_alloc()")
> > Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
>
> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Applied.
Thanks,
Mathieu
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-04-12 17:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-09 6:27 [PATCH v2] remoteproc: mtk_scp: Fix a potential double free Christophe JAILLET
2022-04-11 8:55 ` AngeloGioacchino Del Regno
2022-04-12 17:04 ` Mathieu Poirier
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).