linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joerg Roedel <joro@8bytes.org>
To: Colin King <colin.king@canonical.com>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Radim Krčmář" <rkrcmar@redhat.com>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Ingo Molnar" <mingo@redhat.com>,
	"H . Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, kvm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kvm: svm: fix unsigned compare less than zero comparison
Date: Mon, 19 Sep 2016 12:06:05 +0200	[thread overview]
Message-ID: <20160919100605.GA3541@8bytes.org> (raw)
In-Reply-To: <20160919061159.6341-1-colin.king@canonical.com>

On Mon, Sep 19, 2016 at 07:11:59AM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> vm_data->avic_vm_id is a u32, so the check for a error
> return (less than zero) such as -EAGAIN from
> avic_get_next_vm_id currently has no effect whatsoever.
> Fix this by using a temporary int for the comparison
> and assign vm_data->avic_vm_id to this. I used an explicit
> u32 cast in the assignment to show why vm_data->avic_vm_id
> cannot be used in the assign/compare steps.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Acked-by: Joerg Roedel <jroedel@suse.de>

  reply	other threads:[~2016-09-19 10:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-19  6:11 [PATCH] kvm: svm: fix unsigned compare less than zero comparison Colin King
2016-09-19 10:06 ` Joerg Roedel [this message]
2016-09-19 11:22 ` Paolo Bonzini
2016-09-20  2:50 ` Suravee Suthikulpanit

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=20160919100605.GA3541@8bytes.org \
    --to=joro@8bytes.org \
    --cc=colin.king@canonical.com \
    --cc=hpa@zytor.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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).