From: Christophe JAILLET <[email protected]>

There is no reason to use GFP_ATOMIC in a 'suspend' function.
Use GFP_KERNEL instead to give more opportunities to allocate the
requested memory.

Signed-off-by: Christophe JAILLET <[email protected]>
Link: 
https://lore.kernel.org/r/[email protected]
Signed-off-by: Lu Baolu <[email protected]>
---
 drivers/iommu/intel/iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index d252dcedfd71..d9ba52ba40eb 100644
--- a/drivers/iommu/intel/iommu.c
+++ b/drivers/iommu/intel/iommu.c
@@ -3485,7 +3485,7 @@ static int iommu_suspend(void)
 
        for_each_active_iommu(iommu, drhd) {
                iommu->iommu_state = kcalloc(MAX_SR_DMAR_REGS, sizeof(u32),
-                                                GFP_ATOMIC);
+                                            GFP_KERNEL);
                if (!iommu->iommu_state)
                        goto nomem;
        }
-- 
2.25.1

_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Reply via email to