1
0
Fork 0

kvm: Don't open code task_pid in kvm_vcpu_ioctl

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
hifive-unleashed-5.1
Eric W. Biederman 2017-07-16 21:39:32 -05:00
parent 7a36094d61
commit 71dbc8a969
1 changed files with 1 additions and 1 deletions

View File

@ -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;