Re: [Xen-devel] [PATCH 1/2] xen: fix race in xen_qlock_wait()
From: Juergen Gross
Date: Mon Oct 01 2018 - 04:58:46 EST
On 01/10/2018 10:54, Jan Beulich wrote:
>>>> On 01.10.18 at 09:16, <jgross@xxxxxxxx> wrote:
>> In the following situation a vcpu waiting for a lock might not be
>> woken up from xen_poll_irq():
>>
>> CPU 1: CPU 2: CPU 3:
>> takes a spinlock
>> tries to get lock
>> -> xen_qlock_wait()
>> -> xen_clear_irq_pending()
>
> Doesn't the last line above ...
>
>> frees the lock
>> -> xen_qlock_kick(cpu2)
>
> ... need to be below here?
You are right, of course!
Thanks for noticing.
Juergen