From: Paolo Bonzini <pbonzini@redhat.com>
To: Sam Bobroff <sam.bobroff@au1.ibm.com>, gleb@kernel.org
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH 1/1] KVM: correct null pid check in kvm_vcpu_yield_to()
Date: Fri, 19 Sep 2014 15:33:45 +0200 [thread overview]
Message-ID: <541C30B9.2010603@redhat.com> (raw)
In-Reply-To: <c28fe538f7897b0e6695deef34f40c6ee8f7983d.1411083615.git.sam.bobroff@au1.ibm.com>
Il 19/09/2014 01:40, Sam Bobroff ha scritto:
> Correct a simple mistake of checking the wrong variable
> before a dereference, resulting in the dereference not being
> properly protected by rcu_dereference().
>
> Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com>
> ---
>
> virt/kvm/kvm_main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index 33712fb..688acb0 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -1725,7 +1725,7 @@ int kvm_vcpu_yield_to(struct kvm_vcpu *target)
> rcu_read_lock();
> pid = rcu_dereference(target->pid);
> if (pid)
> - task = get_pid_task(target->pid, PIDTYPE_PID);
> + task = get_pid_task(pid, PIDTYPE_PID);
> rcu_read_unlock();
> if (!task)
> return ret;
>
Thanks, applying to kvm/master.
Paolo
prev parent reply other threads:[~2014-09-19 13:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-18 23:40 [PATCH 1/1] KVM: correct null pid check in kvm_vcpu_yield_to() Sam Bobroff
2014-09-19 13:33 ` Paolo Bonzini [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=541C30B9.2010603@redhat.com \
--to=pbonzini@redhat.com \
--cc=gleb@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=sam.bobroff@au1.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).