diff options
author | Nicolin Chen <nicolinc@nvidia.com> | 2024-07-17 22:01:30 -0700 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2024-07-29 15:14:32 -0300 |
commit | 950aeefb34923fe3c28ade35fe05f24e2c5b1d55 (patch) | |
tree | 407c19b4864f5d07292b1b7e2d124da79cbebede /drivers/iommu/iommufd | |
parent | 8400291e289ee6b2bf9779ff1c83a291501f017b (diff) |
iommufd/device: Fix hwpt at err_unresv in iommufd_device_do_replace()
The rewind routine should remove the reserved iovas added to the new hwpt.
Fixes: 89db31635c87 ("iommufd: Derive iommufd_hwpt_paging from iommufd_hw_pagetable")
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/r/20240718050130.1956804-1-nicolinc@nvidia.com
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/iommu/iommufd')
-rw-r--r-- | drivers/iommu/iommufd/device.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iommu/iommufd/device.c b/drivers/iommu/iommufd/device.c index 9a7ec5997c61..3214a4c17c6b 100644 --- a/drivers/iommu/iommufd/device.c +++ b/drivers/iommu/iommufd/device.c @@ -526,7 +526,7 @@ iommufd_device_do_replace(struct iommufd_device *idev, err_unresv: if (hwpt_is_paging(hwpt)) iommufd_group_remove_reserved_iova(igroup, - to_hwpt_paging(old_hwpt)); + to_hwpt_paging(hwpt)); err_unlock: mutex_unlock(&idev->igroup->lock); return ERR_PTR(rc); |