This is a note to let you know that I've just added the patch titled remoteproc: imx_rproc: Fix a resource leak in the remove function to the 5.16-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: remoteproc-imx_rproc-fix-a-resource-leak-in-the-remove-function.patch and it can be found in the queue-5.16 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 4da96175014be67c846fd274eace08066e525d75 Mon Sep 17 00:00:00 2001 From: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx> Date: Sat, 16 Oct 2021 08:44:28 +0200 Subject: remoteproc: imx_rproc: Fix a resource leak in the remove function From: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx> commit 4da96175014be67c846fd274eace08066e525d75 upstream. 'priv->workqueue' is destroyed in the error handling path of the probe but not in the remove function. Add the missing call to release some resources. Cc: stable <stable@xxxxxxxxxxxxxxx> Fixes: 2df7062002d0 ("remoteproc: imx_proc: enable virtio/mailbox") Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx> Reviewed-by: Peng Fan <peng.fan@xxxxxxx> Tested-by: Peng Fan <peng.fan@xxxxxxx> Link: https://lore.kernel.org/r/d28ca94a4031bd7297d47c2164e18885a5a6ec19.1634366546.git.christophe.jaillet@xxxxxxxxxx Signed-off-by: Mathieu Poirier <mathieu.poirier@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/remoteproc/imx_rproc.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -804,6 +804,7 @@ static int imx_rproc_remove(struct platf clk_disable_unprepare(priv->clk); rproc_del(rproc); imx_rproc_free_mbox(rproc); + destroy_workqueue(priv->workqueue); rproc_free(rproc); return 0; Patches currently in stable-queue which might be from christophe.jaillet@xxxxxxxxxx are queue-5.16/media-venus-core-fix-a-resource-leak-in-the-error-ha.patch queue-5.16/media-mtk-vcodec-fix-an-error-handling-path-in-mtk_v.patch queue-5.16/rdma-bnxt_re-scan-the-whole-bitmap-when-checking-if-.patch queue-5.16/hid-magicmouse-fix-an-error-handling-path-in-magicmouse_probe.patch queue-5.16/tpm_tis-fix-an-error-handling-path-in-tpm_tis_core_i.patch queue-5.16/remoteproc-imx_rproc-fix-a-resource-leak-in-the-remove-function.patch queue-5.16/pci-qcom-fix-an-error-handling-path-in-qcom_pcie_pro.patch queue-5.16/media-venus-core-fix-a-potential-null-pointer-derefe.patch queue-5.16/i3c-master-mipi-i3c-hci-fix-a-potentially-infinite-l.patch