diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2014-03-17 19:11:35 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-03-18 17:06:04 +0100 |
commit | 684a0b719ddbbafe1c7e6646b9bc239453a1773d (patch) | |
tree | eb83541090766873f36f9916e720ff0a85e1eeb2 /security | |
parent | 93c4adc7afedf9b0ec190066d45b6d67db5270da (diff) | |
download | linux-stable-684a0b719ddbbafe1c7e6646b9bc239453a1773d.tar.gz linux-stable-684a0b719ddbbafe1c7e6646b9bc239453a1773d.tar.bz2 linux-stable-684a0b719ddbbafe1c7e6646b9bc239453a1773d.zip |
KVM: eventfd: Fix lock order inversion.
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 <cornelia.huck@de.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'security')
0 files changed, 0 insertions, 0 deletions