Skip to contentSkip to conversation

iommufd/device: Fix hwpt at err_unresv in iommufd_device_do_replace()

PATCH Applied Nicolin Chen 3 participants 5 messages Jul 18, 2024 – Jul 29, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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")
---
 drivers/iommu/iommufd/device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/iommufd/device.c +1 -1
index 9a7ec5997c61c..3214a4c17c6b3 100644
@@ -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);
Signature · 1 line
2.43.0
#2 lore raw
Quoted 6 lines · Kevin
Quoted 6 lines

From: Nicolin Chen <[email protected]>
Sent: Thursday, July 18, 2024 1:02 PM

The rewind routine should remove the reserved iovas added to the new hwpt.

Quoted 6 lines
Quoted 4 lines
Fixes 89db31635c87 ("iommufd: Derive iommufd_hwpt_paging from

iommufd_hw_pagetable")

Jason, it seems that we haven't merged this patch, right?

It still applies against v6.11-rc1. So no need of respin.

Thanks
Nicolin

maintainer
#3 lore raw
Quoted 13 lines · Nicolin Chen
Quoted 11 lines · Kevin
Quoted 10 lines

From: Nicolin Chen <[email protected]>
Sent: Thursday, July 18, 2024 1:02 PM

The rewind routine should remove the reserved iovas added to the new hwpt.

Fixes 89db31635c87 ("iommufd: Derive iommufd_hwpt_paging from

iommufd_hw_pagetable")

Quoted 5 lines
Quoted 1 line

Jason, it seems that we haven't merged this patch, right?

It still applies against v6.11-rc1. So no need of respin.

Yes, I will pick it for the rc1 cycle

Jason