Message ID | 20230309222159.487826-7-jacob.jun.pan@linux.intel.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Remove VT-d virtual command interface and IOASID | expand |
diff --git a/drivers/iommu/iommu-sva.c b/drivers/iommu/iommu-sva.c index b75711bdbe97..bd6fb2a6df23 100644 --- a/drivers/iommu/iommu-sva.c +++ b/drivers/iommu/iommu-sva.c @@ -27,8 +27,8 @@ static int iommu_sva_alloc_pasid(struct mm_struct *mm, ioasid_t min, ioasid_t ma goto out; } - ret = ida_alloc_range(&iommu_global_pasid_ida, min, max, GFP_ATOMIC); - if (ret < 0) + ret = ida_alloc_range(&iommu_global_pasid_ida, min, max, GFP_KERNEL); + if (ret < min) goto out; mm->pasid = ret; ret = 0;