Paul Mackerras
c9438092ca
KVM: PPC: Book3S HV: Take SRCU read lock around kvm_read_guest() call
Running a kernel with CONFIG_PROVE_RCU=y yields the following diagnostic:
===============================
[ INFO: suspicious RCU usage. ]
3.12.0-rc5-kvm+ #9 Not tainted
-------------------------------
include/linux/kvm_host.h:473 suspicious rcu_dereference_check() usage!
other info that might help us debug this:
rcu_scheduler_active = 1, debug_locks = 0
1 lock held by qemu-system-ppc/4831:
stack backtrace:
CPU: 28 PID: 4831 Comm: qemu-system-ppc Not tainted 3.12.0-rc5-kvm+ #9
Call Trace:
[c000000be462b2a0] [c00000000001644c] .show_stack+0x7c/0x1f0 (unreliable)
[c000000be462b370] [c000000000ad57c0] .dump_stack+0x88/0xb4
[c000000be462b3f0] [c0000000001315e8] .lockdep_rcu_suspicious+0x138/0x180
[c000000be462b480] [c00000000007862c] .gfn_to_memslot+0x13c/0x170
[c000000be462b510] [c00000000007d384] .gfn_to_hva_prot+0x24/0x90
[c000000be462b5a0] [c00000000007d420] .kvm_read_guest_page+0x30/0xd0
[c000000be462b630] [c00000000007d528] .kvm_read_guest+0x68/0x110
[c000000be462b6e0] [c000000000084594] .kvmppc_rtas_hcall+0x34/0x180
[c000000be462b7d0] [c000000000097934] .kvmppc_pseries_do_hcall+0x74/0x830
[c000000be462b880] [c0000000000990e8] .kvmppc_vcpu_run_hv+0xff8/0x15a0
[c000000be462b9e0] [c0000000000839cc] .kvmppc_vcpu_run+0x2c/0x40
[c000000be462ba50] [c0000000000810b4] .kvm_arch_vcpu_ioctl_run+0x54/0x1b0
[c000000be462bae0] [c00000000007b508] .kvm_vcpu_ioctl+0x478/0x730
[c000000be462bca0] [c00000000025532c] .do_vfs_ioctl+0x4dc/0x7a0
[c000000be462bd80] [c0000000002556b4] .SyS_ioctl+0xc4/0xe0
[c000000be462be30] [c000000000009ee4] syscall_exit+0x0/0x98
To fix this, we take the SRCU read lock around the kvmppc_rtas_hcall()
call.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
2013-11-18 22:41:20 +01:00
..
2013-10-17 15:24:26 +02:00
2013-10-17 15:24:26 +02:00
2009-03-24 11:02:56 +02:00
2013-10-17 18:42:36 +02:00
2013-10-17 15:24:26 +02:00
2013-10-17 14:49:35 +02:00
2011-09-25 19:52:29 +03:00
2013-10-17 15:36:22 +02:00
2013-11-18 22:36:09 +01:00
2013-10-17 14:49:35 +02:00
2013-08-14 15:33:35 +10:00
2013-10-17 15:17:25 +02:00
2013-08-26 13:19:56 +03:00
2013-10-17 15:45:35 +02:00
2013-10-17 15:18:28 +02:00
2013-07-08 16:20:20 +02:00
2013-07-08 16:21:13 +02:00
2013-07-08 16:21:13 +02:00
2013-10-17 15:15:56 +02:00
2013-01-06 14:02:00 +01:00
2013-11-18 22:36:09 +01:00
2013-04-26 20:27:32 +02:00
2013-11-18 22:38:30 +01:00
2013-11-18 22:41:20 +01:00
2013-10-17 15:24:26 +02:00
2013-10-17 15:36:22 +02:00
2012-04-02 14:00:04 +10:00
2013-10-17 14:45:04 +02:00
2013-11-15 13:51:36 +09:00
2013-10-17 14:49:35 +02:00
2013-10-17 15:45:35 +02:00
2013-10-17 15:26:31 +02:00
2013-10-17 18:43:34 +02:00
2013-05-02 15:28:36 +02:00
2013-10-17 18:43:34 +02:00
2013-10-17 18:42:36 +02:00
2013-01-10 13:42:30 +01:00
2013-03-22 01:21:09 +01:00
2013-11-15 13:51:36 +09:00
2013-10-17 15:24:26 +02:00
2012-12-06 01:34:11 +01:00
2013-10-17 15:24:26 +02:00
2013-11-04 10:20:57 +02:00
2013-01-24 19:23:33 +01:00
2013-10-17 15:37:16 +02:00
2013-10-17 18:42:36 +02:00
2013-10-17 14:49:37 +02:00
2013-10-17 18:42:36 +02:00
2013-10-17 18:42:36 +02:00
2010-09-02 14:07:32 +10:00
2013-05-02 15:28:36 +02:00
2013-11-15 13:51:36 +09:00
2013-10-17 15:45:35 +02:00
2013-05-02 15:28:35 +02:00
2013-10-17 18:43:34 +02:00
2011-07-12 13:16:28 +03:00
2012-04-08 12:51:19 +03:00
2013-10-17 15:37:16 +02:00
2013-10-17 15:36:22 +02:00
2013-10-17 15:37:16 +02:00