archive mirror
 help / color / mirror / Atom feed
From: linmiaohe <>
To: Paolo Bonzini <>
Cc: "" <>,
	"" <>,
	"" <>
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: <> (raw)

Paolo Bonzini <> 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 <>
>Suggested-by: Sean Christopherson <>
>Addresses-Coverity: ("Macro compares unsigned to 0")
>Signed-off-by: Paolo Bonzini <>

Reviewed-by: Miaohe Lin <>

             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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \
    --subject='Re: [PATCH] KVM: x86: fix WARN_ON check of an unsigned less than zero' \

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