From: Adrian Bunk Date: Sat, 28 Apr 2007 19:20:48 +0000 (+0200) Subject: KVM: fix an if() condition X-Git-Tag: v2.6.22-rc1~1008^2~4 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2807696c3791d6dd1dcf20f022eaa2dc7615bc5d;p=linux-2.6 KVM: fix an if() condition It might have worked in this case since PT_PRESENT_MASK is 1, but let's express this correctly. Signed-off-by: Adrian Bunk Signed-off-by: Avi Kivity --- diff --git a/drivers/kvm/mmu.c b/drivers/kvm/mmu.c index 32c64f6820..e8e228118d 100644 --- a/drivers/kvm/mmu.c +++ b/drivers/kvm/mmu.c @@ -1408,7 +1408,7 @@ static void audit_mappings_page(struct kvm_vcpu *vcpu, u64 page_pte, for (i = 0; i < PT64_ENT_PER_PAGE; ++i, va += va_delta) { u64 ent = pt[i]; - if (!ent & PT_PRESENT_MASK) + if (!(ent & PT_PRESENT_MASK)) continue; va = canonicalize(va);