diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2024-03-01 12:01:43 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2024-03-01 12:01:43 -0800 |
commit | 17ba56605bfd139dfa5eba183f9f53ab90deea78 (patch) | |
tree | 2e9cedee035be6c8c0dc52b1885d30485a80bc91 | |
parent | 371e4a1f914aff0d128c518895495ef44059ddc6 (diff) | |
parent | 6384c56c99d98c84afea5b9ec7029a6e153ae431 (diff) | |
download | lwn-17ba56605bfd139dfa5eba183f9f53ab90deea78.tar.gz lwn-17ba56605bfd139dfa5eba183f9f53ab90deea78.zip |
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
-rw-r--r-- | drivers/iommu/iommu-sva.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iommu/iommu-sva.c b/drivers/iommu/iommu-sva.c index 7f91c8d0064b..65814cbc8402 100644 --- a/drivers/iommu/iommu-sva.c +++ b/drivers/iommu/iommu-sva.c @@ -117,11 +117,11 @@ struct iommu_sva *iommu_sva_bind_device(struct device *dev, struct mm_struct *mm if (ret) goto out_free_domain; domain->users = 1; - refcount_set(&handle->users, 1); list_add(&domain->next, &mm->iommu_mm->sva_domains); - list_add(&handle->handle_item, &mm->iommu_mm->sva_handles); out: + refcount_set(&handle->users, 1); + list_add(&handle->handle_item, &mm->iommu_mm->sva_handles); mutex_unlock(&iommu_sva_lock); handle->dev = dev; handle->domain = domain; |