From 71dbc8a96953aa91c50181a526acb7f80af74f67 Mon Sep 17 00:00:00 2001 From: "Eric W. Biederman" Date: Sun, 16 Jul 2017 21:39:32 -0500 Subject: kvm: Don't open code task_pid in kvm_vcpu_ioctl Signed-off-by: "Eric W. Biederman" --- virt/kvm/kvm_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'virt/kvm') 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; -- cgit v1.2.3