Skip to content

Commit 950aeef

Browse files
nicolincjgunthorpe
authored andcommitted
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: 89db316 ("iommufd: Derive iommufd_hwpt_paging from iommufd_hw_pagetable") Cc: [email protected] Link: https://patch.msgid.link/r/[email protected] Signed-off-by: Nicolin Chen <[email protected]> Reviewed-by: Kevin Tian <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent 8400291 commit 950aeef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iommu/iommufd/device.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ iommufd_device_do_replace(struct iommufd_device *idev,
526526
err_unresv:
527527
if (hwpt_is_paging(hwpt))
528528
iommufd_group_remove_reserved_iova(igroup,
529-
to_hwpt_paging(old_hwpt));
529+
to_hwpt_paging(hwpt));
530530
err_unlock:
531531
mutex_unlock(&idev->igroup->lock);
532532
return ERR_PTR(rc);

0 commit comments

Comments
 (0)