mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-26 05:34:13 +08:00
kvm: Don't open code task_pid in kvm_vcpu_ioctl
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
This commit is contained in:
parent
7a36094d61
commit
71dbc8a969
@ -2560,7 +2560,7 @@ static long kvm_vcpu_ioctl(struct file *filp,
|
|||||||
if (arg)
|
if (arg)
|
||||||
goto out;
|
goto out;
|
||||||
oldpid = rcu_access_pointer(vcpu->pid);
|
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. */
|
/* The thread running this VCPU changed. */
|
||||||
struct pid *newpid;
|
struct pid *newpid;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user