Skip to contentSkip to conversation

dmar: iommu mem leak fix

PATCH In review Zhenzhong Duan 3 participants 3 messages Aug 20, 2018 – Aug 22, 2018

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 dmar: iommu mem leak fix

Release memory allocated for drhd iommu in error path.

-v2: fixup wrong parameter hiden due to my removing -Werror

---
 xen/drivers/passthrough/vtd/dmar.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
xen/drivers/passthrough/vtd/dmar.c +1 -0
index 46decd4..8c5fa80 100644
@@ -100,6 +100,7 @@ static void __init disable_all_dmar_units(void)
     {
         list_del(&drhd->list);
         scope_devices_free(&drhd->scope);
+        iommu_free(drhd);
         xfree(drhd);
     }
     list_for_each_entry_safe ( rmrr, _rmrr, &acpi_rmrr_units, list )
Signature · 6 lines
1.7.3

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Reviewed-by on v2 1/2
#1 lore raw
Quoted 4 lines
Quoted 1 line
Quoted 1 line · On 20.08.18 at 12:42, <[email protected]> wrote:

Release memory allocated for drhd iommu in error path.

-v2: fixup wrong parameter hiden due to my removing -Werror

This line belongs ...

Quoted 2 lines

---

... here, so it won't end up in the commit message. Still

And as an advice - removing -Werror is pretty strongly to be advised against.

Finally, while on v1 the Cc list was too short, it ended up too long now: There's no reason for the TXT maintainers to be Cc-ed on this patch, only patch 2 is in needed of this.

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Acked-by on v2 1/2
#2 lore raw
In reply to Zhenzhong Duan
Quoted 8 lines

From: Zhenzhong Duan [mailto:[email protected]]
Sent: Monday, August 20, 2018 6:43 PM

Release memory allocated for drhd iommu in error path.

-v2: fixup wrong parameter hiden due to my removing -Werror

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel