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

[Xen-devel] [PATCH for 4.5] xen/arm: Initialize the domain vgic lock



The domain vgic lock is used uninitialized.

Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx>

---
    This is a bug fix for Xen 4.5 and Xen 4.4. The vgic lock is used
    unitialized. Luckily we only use the field "raw" which is reset to 0
    during the domain allocation.

    There is no harm to apply for Xen 4.5 because it will correctly set
    the spin_lock structure for a later usage.
---
 xen/arch/arm/vgic.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c
index 97061ce..b8bd38b 100644
--- a/xen/arch/arm/vgic.c
+++ b/xen/arch/arm/vgic.c
@@ -90,6 +90,8 @@ int domain_vgic_init(struct domain *d)
         return -ENODEV;
     }
 
+    spin_lock_init(&d->arch.vgic.lock);
+
     d->arch.vgic.shared_irqs =
         xzalloc_array(struct vgic_irq_rank, DOMAIN_NR_RANKS(d));
     if ( d->arch.vgic.shared_irqs == NULL )
-- 
2.1.3


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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