aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Murphy <[email protected]>2017-10-02 11:53:31 +0100
committerJoerg Roedel <[email protected]>2017-10-02 15:45:24 +0200
commitabbb8a09384f69f7bb05936879e51933c146afba (patch)
tree87c6386f5fc66a308c55ccf8791ad4a2e5735106
parente8b198402745ed413ed8229b2eb45d34016eb5d8 (diff)
iommu/iova: Don't try to copy anchor nodes
Anchor nodes are not reserved IOVAs in the way that copy_reserved_iova() cares about - while the failure from reserve_iova() is benign since the target domain will already have its own anchor, we still don't want to be triggering spurious warnings. Reported-by: kernel test robot <[email protected]> Signed-off-by: Robin Murphy <[email protected]> Fixes: bb68b2fbfbd6 ('iommu/iova: Add rbtree anchor node') Signed-off-by: Joerg Roedel <[email protected]>
-rw-r--r--drivers/iommu/iova.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/iommu/iova.c b/drivers/iommu/iova.c
index b0ca23682008..3aee64b99df1 100644
--- a/drivers/iommu/iova.c
+++ b/drivers/iommu/iova.c
@@ -704,6 +704,9 @@ copy_reserved_iova(struct iova_domain *from, struct iova_domain *to)
struct iova *iova = rb_entry(node, struct iova, node);
struct iova *new_iova;
+ if (iova->pfn_lo == IOVA_ANCHOR)
+ continue;
+
new_iova = reserve_iova(to, iova->pfn_lo, iova->pfn_hi);
if (!new_iova)
printk(KERN_ERR "Reserve iova range %lx@%lx failed\n",