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

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



Hi Ian,

On 18/12/2014 09:47, Ian Campbell wrote:
On Wed, 2014-12-17 at 15:40 +0000, Julien Grall wrote:
The domain vgic lock is used uninitialized.

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

Acked-by: Ian Campbell <ian.campbell@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.

By your above reasoning there is also no point, is there? That said, I
think we should take this since as you say it is harmless and good
practice to initialise spinlocks even if not strictly necessary.

It's necessary to initialize spinlocks, not all the field of the spinlock is using the value 0 at initialization time.

What I meant if the current usage is fine. But if we want to debug spinlock, it won't work.

Regards,

--
Julien Grall

_______________________________________________
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®.