Skip to content

Commit 17ba566

Browse files
committed
Merge tag 'iommu-fix-v6.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu
Pull iommu fix from Joerg Roedel: - Fix SVA handle sharing in multi device case * tag 'iommu-fix-v6.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/sva: Fix SVA handle sharing in multi device case
2 parents 371e4a1 + 6384c56 commit 17ba566

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/iommu/iommu-sva.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,11 @@ struct iommu_sva *iommu_sva_bind_device(struct device *dev, struct mm_struct *mm
117117
if (ret)
118118
goto out_free_domain;
119119
domain->users = 1;
120-
refcount_set(&handle->users, 1);
121120
list_add(&domain->next, &mm->iommu_mm->sva_domains);
122-
list_add(&handle->handle_item, &mm->iommu_mm->sva_handles);
123121

124122
out:
123+
refcount_set(&handle->users, 1);
124+
list_add(&handle->handle_item, &mm->iommu_mm->sva_handles);
125125
mutex_unlock(&iommu_sva_lock);
126126
handle->dev = dev;
127127
handle->domain = domain;

0 commit comments

Comments
 (0)