/**Old code returns error if pasid_xrrary is not empty.
* iommu_device_use_default_domain() - Device driver wants to handle
device
* DMA through the kernel DMA API.
@@ -3052,14 +3063,14 @@ int iommu_device_use_default_domain(struct
device *dev)
mutex_lock(&group->mutex);
if (group->owner_cnt) {
- if (group->owner || !iommu_is_default_domain(group) ||
- !xa_empty(&group->pasid_array)) {
+ if (group->owner || !iommu_is_default_domain(group)) {
ret = -EBUSY;
goto unlock_out;
}
}
group->owner_cnt++;
+ assert_pasid_dma_ownership(group);
New code continues to take ownership with a warning.
this is a functional change. Is it intended or not?