linux/arch/powerpc
Alexey Kardashevskiy 716cb11608 KVM: PPC: Book3S: Improve KVM reference counting
The anon fd's ops releases the KVM reference in the release hook.
However we reference the KVM object after we create the fd so there is
small window when the release function can be called and
dereferenced the KVM object which potentially may free it.

It is not a problem at the moment as the file is created and KVM is
referenced under the KVM lock and the release function obtains the same
lock before dereferencing the KVM (although the lock is not held when
calling kvm_put_kvm()) but it is potentially fragile against future changes.

This references the KVM object before creating a file.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
2019-02-22 12:51:02 +11:00
..
boot Kbuild updates for v4.21 2018-12-29 12:03:17 -08:00
configs powerpc/configs: Add PPC4xx_OCM to ppc40x_defconfig 2018-12-30 14:00:47 +11:00
crypto powerpc updates for 4.19 2018-08-17 11:32:50 -07:00
include KVM: PPC: Book3S HV: Add KVM stat largepages_[2M/1G] 2019-02-19 16:00:15 +11:00
kernel powerpc/syscalls: Fix syscall tracing 2019-01-15 21:32:25 +11:00
kvm KVM: PPC: Book3S: Improve KVM reference counting 2019-02-22 12:51:02 +11:00
lib Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
math-emu License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mm powerpc/radix: Fix kernel crash with mremap() 2019-01-31 20:10:15 +11:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2018-12-10 18:00:43 -08:00
oprofile Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
perf powerpc/perf: Update perf_regs structure to include MMCRA 2019-01-08 19:22:47 +11:00
platforms powerpc fixes for 5.0 #4 2019-02-08 16:04:12 -08:00
purgatory powerpc updates for 4.19 2018-08-17 11:32:50 -07:00
sysdev cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
tools powerpc/tools/checkpatch: Ignore DT_SPLIT_BINDING_PATCH 2018-12-04 19:45:01 +11:00
xmon powerpc/xmon: fix dump_segments() 2018-12-19 18:56:32 +11:00
Kbuild powerpc: Add -Werror at arch/powerpc level 2018-10-19 00:56:17 +11:00
Kconfig Kconfig file consolidation for v4.21 2018-12-29 13:40:29 -08:00
Kconfig.debug powerpc: remove redundant 'default n' from Kconfig-s 2018-10-13 22:21:25 +11:00
Makefile powerpc updates for 4.21 2018-12-27 10:43:24 -08:00
Makefile.postlink License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00