1
0
Fork 0
alistair23-linux/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 ipc: use Kconfig options for __ARCH_WANT_[COMPAT_]IPC_PARSE_VERSION 2012-07-30 17:25:21 -07:00
blackfin Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k 2012-08-03 10:52:41 -07:00
c6x Enable atomic64 ops in C6X 2012-08-17 08:10:12 -07:00
cris ipc: use Kconfig options for __ARCH_WANT_[COMPAT_]IPC_PARSE_VERSION 2012-07-30 17:25:21 -07:00
frv Merge branch 'akpm' (Andrew's patch-bomb) 2012-07-30 17:25:34 -07:00
h8300 ipc: use Kconfig options for __ARCH_WANT_[COMPAT_]IPC_PARSE_VERSION 2012-07-30 17:25:21 -07:00
hexagon Merge branch 'trivial' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2012-07-30 11:24:53 -07:00
ia64 KVM: split kvm_arch_flush_shadow 2012-09-06 16:37:25 +03:00
m32r ipc: use Kconfig options for __ARCH_WANT_[COMPAT_]IPC_PARSE_VERSION 2012-07-30 17:25:21 -07:00
m68k m68k: select CONFIG_GENERIC_ATOMIC64 for all m68k CPU types 2012-08-17 10:04:24 +10:00
microblaze Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k 2012-08-03 10:52:41 -07:00
mips MIPS: pci-ar724x: avoid data bus error due to a missing PCIe module 2012-08-23 15:44:47 +02:00
mn10300 Merge branch 'akpm' (Andrew's patch-bomb) 2012-07-30 17:25:34 -07:00
openrisc Remove useless wrappers of asm-generic/rmap.h 2012-06-28 11:29:26 +02:00
parisc PCI changes for the 3.6 merge window: 2012-07-24 16:17:07 -07:00
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 new helper: signal_delivered() 2012-06-01 12:58:52 -04:00
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 memcg: rename config variables 2012-07-31 18:42:43 -07:00
um Merge branch 'for-linus-3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml 2012-08-01 16:45:02 -07:00
unicore32 PCI changes for the 3.6 merge window: 2012-07-24 16:17:07 -07:00
x86 KVM: make processes waiting on vcpu mutex killable 2012-09-17 13:46:32 -03:00
xtensa xtensa: select generic atomic64_t support 2012-07-31 18:42:39 -07:00
.gitignore
Kconfig ipc: use Kconfig options for __ARCH_WANT_[COMPAT_]IPC_PARSE_VERSION 2012-07-30 17:25:21 -07:00