linux/virt/kvm
Michael S. Tsirkin 9fc77441e5 KVM: make processes waiting on vcpu mutex killable
vcpu mutex can be held for unlimited time so
taking it with mutex_lock on an ioctl is wrong:
one process could be passed a vcpu fd and
call this ioctl on the vcpu used by another process,
it will then be unkillable until the owner exits.

Call mutex_lock_killable instead and return status.
Note: mutex_lock_interruptible would be even nicer,
but I am not sure all users are prepared to handle EINTR
from these ioctls. They might misinterpret it as an error.

Cleanup paths expect a vcpu that can't be used by
any userspace so this will always succeed - catch bugs
by calling BUG_ON.

Catch callers that don't check return state by adding
__must_check.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2012-09-17 13:46:32 -03:00
..
Kconfig KVM: Add config to support ple or cpu relax optimzation 2012-07-23 13:00:53 +03:00
assigned-dev.c KVM: Fix device assignment threaded irq handler 2012-07-11 13:01:48 +03:00
async_pf.c KVM: do not release the error page 2012-08-06 16:04:58 +03:00
async_pf.h KVM: Halt vcpu if page it tries to access is swapped out 2011-01-12 11:21:39 +02:00
coalesced_mmio.c KVM: make checks stricter in coalesced_mmio_in_range() 2011-12-27 11:17:07 +02:00
coalesced_mmio.h KVM: Make coalesced mmio use a device per zone 2011-09-25 19:17:57 +03:00
eventfd.c KVM: Sanitize KVM_IRQFD flags 2012-07-02 21:10:30 -03:00
ioapic.c KVM: x86: drop parameter validation in ioapic/pic 2012-08-14 22:35:22 -03:00
ioapic.h KVM: fix race with level interrupts 2012-07-20 16:12:00 -03:00
iodev.h KVM: remove in_range from io devices 2009-09-10 08:33:05 +03:00
iommu.c KVM: do not release the error pfn 2012-08-06 16:04:57 +03:00
irq_comm.c Merge branch 'queue' into next 2012-07-26 11:54:21 +03:00
kvm_main.c KVM: make processes waiting on vcpu mutex killable 2012-09-17 13:46:32 -03:00