From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751199AbdJBKxk (ORCPT ); Mon, 2 Oct 2017 06:53:40 -0400 Received: from foss.arm.com ([217.140.101.70]:35472 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751127AbdJBKxh (ORCPT ); Mon, 2 Oct 2017 06:53:37 -0400 From: Robin Murphy To: joro@8bytes.org Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: [PATCH] iommu/iova: Don't try to copy anchor nodes Date: Mon, 2 Oct 2017 11:53:31 +0100 Message-Id: <3f64827632194aa89821d9183baa08321f00167d.1506941611.git.robin.murphy@arm.com> X-Mailer: git-send-email 2.13.4.dirty Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Robin Murphy --- drivers/iommu/iova.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/iommu/iova.c b/drivers/iommu/iova.c index bd854ca9fa80..c258ba84ee62 100644 --- a/drivers/iommu/iova.c +++ b/drivers/iommu/iova.c @@ -705,6 +705,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", -- 2.13.4.dirty