[<prev] [next>] [day] [month] [year] [list]
Message-ID: <65768baced1c4d9e87555c9057c2c488@huawei.com>
Date: Wed, 12 Feb 2020 12:47:37 +0000
From: linmiaohe <linmiaohe@...wei.com>
To: Paolo Bonzini <pbonzini@...hat.com>
CC: "colin.king@...onical.com" <colin.king@...onical.com>,
"sean.j.christopherson@...el.com" <sean.j.christopherson@...el.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>
Subject: Re: [PATCH] KVM: x86: fix WARN_ON check of an unsigned less than zero
Paolo Bonzini <pbonzini@...hat.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@...onical.com>
>Suggested-by: Sean Christopherson <sean.j.christopherson@...el.com>
>Addresses-Coverity: ("Macro compares unsigned to 0")
>Signed-off-by: Paolo Bonzini <pbonzini@...hat.com>
>---
Reviewed-by: Miaohe Lin <linmiaohe@...wei.com>
Powered by blists - more mailing lists