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

[Xen-changelog] [xen master] xen/arm: vgic-v3-its: Make vgic_v3_its_free_domain idempotent



commit dcc18294ff3ecb66d0fa695fd22e1e76e42a8808
Author:     Julien Grall <julien.grall@xxxxxxx>
AuthorDate: Tue Sep 4 20:21:53 2018 +0100
Commit:     Julien Grall <julien.grall@xxxxxxx>
CommitDate: Mon Oct 1 12:04:16 2018 +0100

    xen/arm: vgic-v3-its: Make vgic_v3_its_free_domain idempotent
    
    vgic_v3_its_free_domain may be called before vgic_v3_its_init_domain if
    the vGIC was failing to initalize itself. This means the list would be
    unitialized and result in a crash.
    
    Thankfully, we only allow ITS for the hardware domain. So the crash is
    not a security issue. Fix it by checking whether the list the NULL.
    
    Signed-off-by: Julien Grall <julien.grall@xxxxxxx>
    Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
---
 xen/arch/arm/vgic-v3-its.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/xen/arch/arm/vgic-v3-its.c b/xen/arch/arm/vgic-v3-its.c
index 32061c6b03..9edd97c4e7 100644
--- a/xen/arch/arm/vgic-v3-its.c
+++ b/xen/arch/arm/vgic-v3-its.c
@@ -1548,6 +1548,10 @@ void vgic_v3_its_free_domain(struct domain *d)
 {
     struct virt_its *pos, *temp;
 
+    /* Cope with unitialized vITS */
+    if ( list_head_is_null(&d->arch.vgic.vits_list) )
+        return;
+
     list_for_each_entry_safe( pos, temp, &d->arch.vgic.vits_list, vits_list )
     {
         list_del(&pos->vits_list);
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
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®.