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

Re: [Xen-devel] [PATCH] arm/acpi: Fix the deadlock in function vgic_lock_rank()



Hi Stefano,

On 01/06/16 10:54, Stefano Stabellini wrote:
spin_is_locked does not work as you expect. The function will not tell you if
the lock was taken by the current CPU, but if the lock was taken by *a* CPU.

It would be possible to have CPU A calling this function and have CPU B with
the lock taken. So the data structure would be accessed by 2 CPUs
concurrently, which is unsafe.

Damn, you are right. I don't think we have a spin_lock function which
tells us if the spin_lock was taken by us.

Unfortunately not.

The only other option I see would be duplicating route_irq_to_guest and
gic_route_irq_to_guest, introducing a second version of those functions
which assume that the rank lock was already taken. Very very ugly. I'll
just revert the commit and wait for better patches from Shannon.

I am working on a patch series to decouple IRQ configuration and routing. It should be ready soon.

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