kernel-hacking-2024-linux-s.../arch
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
..
alpha alpha: Fix fall-out from disintegrating asm/system.h 2012-08-19 08:41:19 -07:00
arm arm-soc fixes for v3.6-rc3 2012-08-25 17:33:33 -07:00
avr32
blackfin
c6x Enable atomic64 ops in C6X 2012-08-17 08:10:12 -07:00
cris
frv
h8300
hexagon
ia64 KVM: split kvm_arch_flush_shadow 2012-09-06 16:37:25 +03:00
m32r
m68k m68k: select CONFIG_GENERIC_ATOMIC64 for all m68k CPU types 2012-08-17 10:04:24 +10:00
microblaze
mips MIPS: pci-ar724x: avoid data bus error due to a missing PCIe module 2012-08-23 15:44:47 +02:00
mn10300
openrisc
parisc
powerpc KVM: split kvm_arch_flush_shadow 2012-09-06 16:37:25 +03:00
s390 KVM: split kvm_arch_flush_shadow 2012-09-06 16:37:25 +03:00
score
sh Merge branches 'sh/urgent' and 'sh/gpiolib' into sh-latest 2012-08-09 13:21:13 +09:00
sparc sparc64: Be less verbose during vmemmap population. 2012-08-15 00:37:29 -07:00
tile
um
unicore32
x86 KVM: make processes waiting on vcpu mutex killable 2012-09-17 13:46:32 -03:00
xtensa
.gitignore
Kconfig