[PATCH 0/2] KVM: Synchronize KVM devices list access and create ops

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Currently accesses the kvm->devices list is not synchronized by any
mechanism which can potentially lead to data corruption.  Further, a
number of the create operations on the individual devices are racy and
would allow creation of multiple devices, opposite to the intention.

Factor out portions of the XICS create operation into a separate init
operation and protect the remaining list accesses and create operations
with the kvm->lock.

Tested on arm/arm64 and compile-tested on powerpc for the xics changes.
Tested-by on other archs would be appreciated.

Christoffer Dall (2):
  KVM: PPC: Move xics_debugfs_init out of create
  KVM: Protect device ops->create and list_add with kvm->lock

 arch/arm/kvm/arm.c             |  6 +++++-
 arch/powerpc/kvm/book3s_xics.c | 12 ++++++++----
 include/linux/kvm_host.h       |  6 ++++++
 virt/kvm/arm/vgic/vgic-init.c  | 17 ++++-------------
 virt/kvm/kvm_main.c            | 16 +++++++++++++++-
 5 files changed, 38 insertions(+), 19 deletions(-)

-- 
2.9.0

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux