Patch "iommu/qcom: Fix local_base status check" has been added to the 5.6-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/qcom: Fix local_base status check

to the 5.6-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-qcom-fix-local_base-status-check.patch
and it can be found in the queue-5.6 subdirectory.

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



commit 691ecfb9ee7d048199ea485a2cbbc6c36075099e
Author: Tang Bin <tangbin@xxxxxxxxxxxxxxxxxxxx>
Date:   Sat Apr 18 21:47:03 2020 +0800

    iommu/qcom: Fix local_base status check
    
    commit b52649aee6243ea661905bdc5fbe28cc5f6dec76 upstream.
    
    The function qcom_iommu_device_probe() does not perform sufficient
    error checking after executing devm_ioremap_resource(), which can
    result in crashes if a critical error path is encountered.
    
    Fixes: 0ae349a0f33f ("iommu/qcom: Add qcom_iommu")
    Signed-off-by: Tang Bin <tangbin@xxxxxxxxxxxxxxxxxxxx>
    Reviewed-by: Bjorn Andersson <bjorn.andersson@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20200418134703.1760-1-tangbin@xxxxxxxxxxxxxxxxxxxx
    Signed-off-by: Joerg Roedel <jroedel@xxxxxxx>
    Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

diff --git a/drivers/iommu/qcom_iommu.c b/drivers/iommu/qcom_iommu.c
index 4328da0b0a9fd..b160cf140e167 100644
--- a/drivers/iommu/qcom_iommu.c
+++ b/drivers/iommu/qcom_iommu.c
@@ -813,8 +813,11 @@ static int qcom_iommu_device_probe(struct platform_device *pdev)
 	qcom_iommu->dev = dev;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (res)
+	if (res) {
 		qcom_iommu->local_base = devm_ioremap_resource(dev, res);
+		if (IS_ERR(qcom_iommu->local_base))
+			return PTR_ERR(qcom_iommu->local_base);
+	}
 
 	qcom_iommu->iface_clk = devm_clk_get(dev, "iface");
 	if (IS_ERR(qcom_iommu->iface_clk)) {



[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