iommu/vt-d: Fixes for v5.13-rc4
Subsystems (3)
Lu Baolu
maintainerHi Joerg,
A small fix is queued for v5.13. It fixes:
- sysfs leak in alloc_iommu.
Please consider it for v5.13.
Best regards,
Lu Baolu
Rolf Eike Beer (1):
iommu/vt-d: Fix sysfs leak in alloc_iommu()
drivers/iommu/intel/dmar.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Signature · 6 lines
2.25.1 _______________________________________________ iommu mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/iommu
Lu Baolu
maintainerPATCH 1/1 iommu/vt-d: Fix sysfs leak in alloc_iommu()
From: Rolf Eike Beer <[email protected]>
iommu_device_sysfs_add() is called before, so is has to be cleaned on subsequent errors.
Fixes 39ab9555c2411 ("iommu: Add sysfs bindings for struct iommu_device")
Cc [email protected] # 4.11.x
Signed-off-by Rolf Eike Beer <[email protected]>
Acked-by Lu Baolu <[email protected]>
--- drivers/iommu/intel/dmar.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/iommu/intel/dmar.c +3 -1
@@ -1142,7 +1142,7 @@ static int alloc_iommu(struct dmar_drhd_unit *drhd) err =iommu_device_register (&iommu->iommu, &intel_iommu_ops,NULL );if (err) - goto err_unmap; + goto err_sysfs; } drhd->iommu = iommu;
@@ -1150,6 +1150,8 @@ static int alloc_iommu(struct dmar_drhd_unit *drhd)return 0 ; +err_sysfs: +iommu_device_sysfs_remove (&iommu->iommu); err_unmap:unmap_iommu (iommu); error_free_seq_id:
Signature · 1 line
2.25.1