summaryrefslogtreecommitdiff
path: root/virt
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2017-07-16 21:39:32 -0500
committerEric W. Biederman <ebiederm@xmission.com>2018-07-21 10:43:12 -0500
commit71dbc8a96953aa91c50181a526acb7f80af74f67 (patch)
tree6310ddb52e34c0bbed0c1837b95c1fd9a55a8896 /virt
parent7a36094d61bfe9843de5484ff0140227983ac5d5 (diff)
kvm: Don't open code task_pid in kvm_vcpu_ioctl
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'virt')
-rw-r--r--virt/kvm/kvm_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index ada21f47f22b..4c593acc4510 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -2560,7 +2560,7 @@ static long kvm_vcpu_ioctl(struct file *filp,
if (arg)
goto out;
oldpid = rcu_access_pointer(vcpu->pid);
- if (unlikely(oldpid != current->pids[PIDTYPE_PID].pid)) {
+ if (unlikely(oldpid != task_pid(current))) {
/* The thread running this VCPU changed. */
struct pid *newpid;