linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: linmiaohe <linmiaohe@huawei.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: "colin.king@canonical.com" <colin.king@canonical.com>,
	"sean.j.christopherson@intel.com"
	<sean.j.christopherson@intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: [PATCH] KVM: x86: fix WARN_ON check of an unsigned less than zero
Date: Wed, 12 Feb 2020 12:47:37 +0000	[thread overview]
Message-ID: <65768baced1c4d9e87555c9057c2c488@huawei.com> (raw)

Paolo Bonzini <pbonzini@redhat.com> writes:
> The check cpu->hv_clock.system_time < 0 is redundant since system_time is a u64 and hence can never be less than zero.  But what was actually meant is to check that the result is positive, since kernel_ns and
> v->kvm->arch.kvmclock_offset are both s64.
>
>Reported-by: Colin King <colin.king@canonical.com>
>Suggested-by: Sean Christopherson <sean.j.christopherson@intel.com>
>Addresses-Coverity: ("Macro compares unsigned to 0")
>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>---

Reviewed-by: Miaohe Lin <linmiaohe@huawei.com>


             reply	other threads:[~2020-02-12 12:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-12 12:47 linmiaohe [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-02-12 12:28 Paolo Bonzini

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=65768baced1c4d9e87555c9057c2c488@huawei.com \
    --to=linmiaohe@huawei.com \
    --cc=colin.king@canonical.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=sean.j.christopherson@intel.com \
    --subject='Re: [PATCH] KVM: x86: fix WARN_ON check of an unsigned less than zero' \
    /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

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).