[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen stable-4.5] IOMMU: always call teardown callback



commit 43d06efb724d32a70b1cc9973d7cdcbbb5d96105
Author:     Oleksandr Tyshchenko <olekstysh@xxxxxxxxx>
AuthorDate: Wed Feb 15 12:21:03 2017 +0000
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Wed Feb 15 12:21:03 2017 +0000

    IOMMU: always call teardown callback
    
    There is a possible scenario when (d)->need_iommu remains unset
    during guest domain execution. For example, when no devices
    were assigned to it. Taking into account that teardown callback
    is not called when (d)->need_iommu is unset we might have unreleased
    resourses after destroying domain.
    
    So, always call teardown callback to roll back actions
    that were performed in init callback.
    
    This is XSA-207.
    
    Signed-off-by: Oleksandr Tyshchenko <olekstysh@xxxxxxxxx>
    Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
    Tested-by: Jan Beulich <jbeulich@xxxxxxxx>
    Tested-by: Julien Grall <julien.grall@xxxxxxx>
---
 xen/drivers/passthrough/iommu.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iommu.c
index 330f443..f2841de 100644
--- a/xen/drivers/passthrough/iommu.c
+++ b/xen/drivers/passthrough/iommu.c
@@ -191,8 +191,7 @@ void iommu_domain_destroy(struct domain *d)
     if ( !iommu_enabled || !dom_iommu(d)->platform_ops )
         return;
 
-    if ( need_iommu(d) )
-        iommu_teardown(d);
+    iommu_teardown(d);
 
     arch_iommu_domain_destroy(d);
 }
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.5

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.