qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 1/5] KVM: eventfd: Fix lock order inversion.


From: Cornelia Huck
Subject: Re: [Qemu-devel] [PATCH v2 1/5] KVM: eventfd: Fix lock order inversion.
Date: Tue, 18 Mar 2014 10:18:25 +0100

On Mon, 17 Mar 2014 22:55:49 +0100
Christian Borntraeger <address@hidden> wrote:

> On 17/03/14 19:11, Cornelia Huck wrote:
> > When registering a new irqfd, we call its ->poll method to collect any
> > event that might have previously been pending so that we can trigger it.
> > This is done under the kvm->irqfds.lock, which means the eventfd's ctx
> > lock is taken under it.
> > 
> > However, if we get a POLLHUP in irqfd_wakeup, we will be called with the
> > ctx lock held before getting the irqfds.lock to deactivate the irqfd,
> > causing lockdep to complain.
> > 
> > Calling the ->poll method does not really need the irqfds.lock, so let's
> > just move it after we've given up the irqfds.lock in kvm_irqfd_assign().
> > 
> > Signed-off-by: Cornelia Huck <address@hidden>
> Do you still have the lockdep message somewhere? 

Unfortunately not, and it does not seem to be readily triggerable.

> Looking at the patch and the description this makes sense. Even without
> irqfd for s390:
> Reviewed-by: Christian Borntraeger <address@hidden>
> 
> Paolo, maybe this patch can go in independently from s390?
> 
> Christian




reply via email to

[Prev in Thread] Current Thread [Next in Thread]