[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191018092002.wmgjhfit56ezkyu6@cantor>
Date: Fri, 18 Oct 2019 02:20:02 -0700
From: Jerry Snitselaar <jsnitsel@...hat.com>
To: Joerg Roedel <joro@...tes.org>
Cc: iommu@...ts.linux-foundation.org, Joerg Roedel <jroedel@...e.de>,
linux-kernel@...r.kernel.org,
Dan Carpenter <dan.carpenter@...cle.com>
Subject: Re: [PATCH] iommu/amd: Pass gfp flags to iommu_map_page() in
amd_iommu_map()
On Fri Oct 18 19, Joerg Roedel wrote:
>From: Joerg Roedel <jroedel@...e.de>
>
>A recent commit added a gfp parameter to amd_iommu_map() to make it
>callable from atomic context, but forgot to pass it down to
>iommu_map_page() and left GFP_KERNEL there. This caused
>sleep-while-atomic warnings and needs to be fixed.
>
>Reported-by: Qian Cai <cai@....pw>
>Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
>Fixes: 781ca2de89ba ("iommu: Add gfp parameter to iommu_ops::map")
>Signed-off-by: Joerg Roedel <jroedel@...e.de>
>---
> drivers/iommu/amd_iommu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
>index 0d2479546b77..fb54df5c2e11 100644
>--- a/drivers/iommu/amd_iommu.c
>+++ b/drivers/iommu/amd_iommu.c
>@@ -2561,7 +2561,7 @@ static int amd_iommu_map(struct iommu_domain *dom, unsigned long iova,
> if (iommu_prot & IOMMU_WRITE)
> prot |= IOMMU_PROT_IW;
>
>- ret = iommu_map_page(domain, iova, paddr, page_size, prot, GFP_KERNEL);
>+ ret = iommu_map_page(domain, iova, paddr, page_size, prot, gfp);
>
> domain_flush_np_cache(domain, iova, page_size);
>
>--
>2.16.4
>
>_______________________________________________
>iommu mailing list
>iommu@...ts.linux-foundation.org
>https://lists.linuxfoundation.org/mailman/listinfo/iommu
Reviewed-by: Jerry Snitselaar <jsnitsel@...hat.com>
Powered by blists - more mailing lists