Skip to contentSkip to conversation

passthrough: fix domain ref leak after 24888:71159fb049f2

PATCH In review Jan Beulich 2 participants 2 messages Mar 7, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 passthrough: fix domain ref leak after 24888:71159fb049f2

As pointed out by Keir.

xen/drivers/passthrough/iommu.c +2 -0
@@ -580,6 +580,8 @@ int iommu_do_domctl(
             printk(XENLOG_G_ERR
                    "XEN_DOMCTL_assign_device: get_domain_by_id() failed\n");
             ret = -EINVAL;
+            if ( d )
+                goto assign_device_out;
             break;
         }
 

passthrough: fix domain ref leak after 24888:71159fb049f2

As pointed out by Keir.

xen/drivers/passthrough/iommu.c +2 -0
@@ -580,6 +580,8 @@ int iommu_do_domctl(
             printk(XENLOG_G_ERR
                    "XEN_DOMCTL_assign_device: get_domain_by_id() failed\n");
             ret = -EINVAL;
+            if ( d )
+                goto assign_device_out;
             break;
         }
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

Acked-by on v1 1/1
#1 lore raw
Quoted 3 lines · Jan Beulich

As pointed out by Keir.

Quoted 18 lines
xen/drivers/passthrough/iommu.c +2 -0
@@ -580,6 +580,8 @@ int iommu_do_domctl(
             printk(XENLOG_G_ERR
                    "XEN_DOMCTL_assign_device: get_domain_by_id() failed\n");
             ret = -EINVAL;
+            if ( d )
+                goto assign_device_out;
             break;
         }
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel