linux_old1/arch/s390/kvm
Christian Borntraeger 4f89914742 KVM: s390: take srcu lock when getting/setting storage keys
The following warning was triggered by missing srcu locks around
the storage key handling functions.

=============================
WARNING: suspicious RCU usage
4.12.0+ #56 Not tainted
-----------------------------
./include/linux/kvm_host.h:572 suspicious rcu_dereference_check() usage!
rcu_scheduler_active = 2, debug_locks = 1
 1 lock held by live_migration/4936:
  #0:  (&mm->mmap_sem){++++++}, at: [<0000000000141be0>]
kvm_arch_vm_ioctl+0x6b8/0x22d0

 CPU: 8 PID: 4936 Comm: live_migration Not tainted 4.12.0+ #56
 Hardware name: IBM 2964 NC9 704 (LPAR)
 Call Trace:
 ([<000000000011378a>] show_stack+0xea/0xf0)
  [<000000000055cc4c>] dump_stack+0x94/0xd8
  [<000000000012ee70>] gfn_to_memslot+0x1a0/0x1b8
  [<0000000000130b76>] gfn_to_hva+0x2e/0x48
  [<0000000000141c3c>] kvm_arch_vm_ioctl+0x714/0x22d0
  [<000000000013306c>] kvm_vm_ioctl+0x11c/0x7b8
  [<000000000037e2c0>] do_vfs_ioctl+0xa8/0x6c8
  [<000000000037e984>] SyS_ioctl+0xa4/0xb8
  [<00000000008b20a4>] system_call+0xc4/0x27c
 1 lock held by live_migration/4936:
  #0:  (&mm->mmap_sem){++++++}, at: [<0000000000141be0>]
kvm_arch_vm_ioctl+0x6b8/0x22d0

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Pierre Morel<pmorel@linux.vnet.ibm.com>
2017-07-25 14:59:52 +02:00
..
Kconfig KVM: halt_polling: provide a way to qualify wakeups during poll 2016-05-13 17:29:23 +02:00
Makefile KVM: s390: vsie: initial support for nested virtualization 2016-06-21 09:43:33 +02:00
diag.c KVM: s390: provide logging for diagnose 0x500 2016-06-10 12:07:26 +02:00
gaccess.c PPC: 2017-07-06 18:38:31 -07:00
gaccess.h s390: rename psw_bits enums 2017-06-12 16:26:02 +02:00
guestdbg.c s390: rename psw_bits enums 2017-06-12 16:26:02 +02:00
intercept.c KVM: s390: Support keyless subset guest mode 2017-04-21 11:08:11 +02:00
interrupt.c PPC: 2017-07-06 18:38:31 -07:00
irq.h KVM: s390: irq routing for adapter interrupts. 2014-03-21 13:43:00 +01:00
kvm-s390.c KVM: s390: take srcu lock when getting/setting storage keys 2017-07-25 14:59:52 +02:00
kvm-s390.h KVM: s390: Inject machine check into the guest 2017-06-28 12:42:32 +02:00
priv.c PPC: 2017-07-06 18:38:31 -07:00
sigp.c KVM: s390: don't use CPUSTAT_WAIT to detect if a VCPU is idle 2016-06-21 09:43:45 +02:00
sthyi.c KVM: s390: Handle sthyi also for instruction intercept 2017-03-16 13:04:38 +01:00
trace-s390.h KVM: s390: introduce adapter interrupt inject function 2017-04-06 13:15:37 +02:00
trace.h KVM: s390: trace and count all skey intercepts 2016-06-10 12:07:31 +02:00
vsie.c KVM: s390: Inject machine check into the nested guest 2017-06-28 12:42:33 +02:00