Browse Source

kvm: Don't open code task_pid in kvm_vcpu_ioctl

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Eric W. Biederman 8 years ago
parent
commit
71dbc8a969
1 changed files with 1 additions and 1 deletions
  1. 1 1
      virt/kvm/kvm_main.c

+ 1 - 1
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;