Patch "iommu/fsl_pamu: Fix resource leak in fsl_pamu_probe()" has been added to the 6.0-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    iommu/fsl_pamu: Fix resource leak in fsl_pamu_probe()

to the 6.0-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:
     iommu-fsl_pamu-fix-resource-leak-in-fsl_pamu_probe.patch
and it can be found in the queue-6.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 09b38c28c27c900b8c18fe88fd555f570158c21d
Author: Yuan Can <yuancan@xxxxxxxxxx>
Date:   Mon Nov 21 08:20:22 2022 +0000

    iommu/fsl_pamu: Fix resource leak in fsl_pamu_probe()
    
    [ Upstream commit 73f5fc5f884ad0c5f7d57f66303af64f9f002526 ]
    
    The fsl_pamu_probe() returns directly when create_csd() failed, leaving
    irq and memories unreleased.
    Fix by jumping to error if create_csd() returns error.
    
    Fixes: 695093e38c3e ("iommu/fsl: Freescale PAMU driver and iommu implementation.")
    Signed-off-by: Yuan Can <yuancan@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20221121082022.19091-1-yuancan@xxxxxxxxxx
    Signed-off-by: Joerg Roedel <jroedel@xxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/iommu/fsl_pamu.c b/drivers/iommu/fsl_pamu.c
index 0d03f837a5d4..7a1a413f75ab 100644
--- a/drivers/iommu/fsl_pamu.c
+++ b/drivers/iommu/fsl_pamu.c
@@ -868,7 +868,7 @@ static int fsl_pamu_probe(struct platform_device *pdev)
 		ret = create_csd(ppaact_phys, mem_size, csd_port_id);
 		if (ret) {
 			dev_err(dev, "could not create coherence subdomain\n");
-			return ret;
+			goto error;
 		}
 	}
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux