summaryrefslogtreecommitdiff
path: root/include/linux/kvm_host.h
diff options
context:
space:
mode:
authorChristian Borntraeger <borntraeger@de.ibm.com>2017-07-06 15:44:28 +0300
committerChristian Borntraeger <borntraeger@de.ibm.com>2017-07-07 14:00:19 +0300
commit0e4524a5d341e719e8ee9ee7db5d58e2c5a4c10e (patch)
tree8bbd2dce248814dd8711ded32a19a8e982dba1ae /include/linux/kvm_host.h
parent1372324b328cd5dabaef5e345e37ad48c63df2a9 (diff)
downloadlinux-0e4524a5d341e719e8ee9ee7db5d58e2c5a4c10e.tar.xz
KVM: mark vcpu->pid pointer as rcu protected
We do use rcu to protect the pid pointer. Mark it as such and adopt all code to use the proper access methods. This was detected by sparse. "virt/kvm/kvm_main.c:2248:15: error: incompatible types in comparison expression (different address spaces)" Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/linux/kvm_host.h')
-rw-r--r--include/linux/kvm_host.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 0b50e7b35ed4..bcd37b855c66 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -234,7 +234,7 @@ struct kvm_vcpu {
int guest_fpu_loaded, guest_xcr0_loaded;
struct swait_queue_head wq;
- struct pid *pid;
+ struct pid __rcu *pid;
int sigset_active;
sigset_t sigset;
struct kvm_vcpu_stat stat;