Patch "iommu/dma: Fix IOVA reserve dma ranges" has been added to the 5.13-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/dma: Fix IOVA reserve dma ranges

to the 5.13-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-dma-fix-iova-reserve-dma-ranges.patch
and it can be found in the queue-5.13 subdirectory.

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



commit a6188518ffef369524cbb4aef99bd9e61757e71d
Author: Srinath Mannam <srinath.mannam@xxxxxxxxxxxx>
Date:   Mon Sep 14 12:53:19 2020 +0530

    iommu/dma: Fix IOVA reserve dma ranges
    
    [ Upstream commit 571f316074a203e979ea90211d9acf423dfe5f46 ]
    
    Fix IOVA reserve failure in the case when address of first memory region
    listed in dma-ranges is equal to 0x0.
    
    Fixes: aadad097cd46f ("iommu/dma: Reserve IOVA for PCIe inaccessible DMA address")
    Signed-off-by: Srinath Mannam <srinath.mannam@xxxxxxxxxxxx>
    Reviewed-by: Robin Murphy <robin.murphy@xxxxxxx>
    Tested-by: Sven Peter <sven@xxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20200914072319.6091-1-srinath.mannam@xxxxxxxxxxxx
    Signed-off-by: Joerg Roedel <jroedel@xxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c
index 7bcdd1205535..95e7349ac3f1 100644
--- a/drivers/iommu/dma-iommu.c
+++ b/drivers/iommu/dma-iommu.c
@@ -243,9 +243,11 @@ resv_iova:
 			lo = iova_pfn(iovad, start);
 			hi = iova_pfn(iovad, end);
 			reserve_iova(iovad, lo, hi);
-		} else {
+		} else if (end < start) {
 			/* dma_ranges list should be sorted */
-			dev_err(&dev->dev, "Failed to reserve IOVA\n");
+			dev_err(&dev->dev,
+				"Failed to reserve IOVA [%#010llx-%#010llx]\n",
+				start, end);
 			return -EINVAL;
 		}
 



[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