]> xenbits.xensource.com Git - xen.git/commitdiff
x86/hap: Remove bogus assertion in hap_free_p2m_page()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 25 Sep 2013 08:45:53 +0000 (10:45 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 25 Sep 2013 08:45:53 +0000 (10:45 +0200)
Coverity ID: 1055622

Coverity correctly points out that this ASSERT() is unconditionally true as an
unsigned integer is always >= 0.

Judging from the shadow counterpart and p2m callsites, there is nothing
invalid about freeing the final p2m page.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
xen/arch/x86/mm/hap/hap.c

index bff05d97a31e76e498454914cd343c500b7878bb..d3f64bdb9764bb884d57be0560f37324ec7a1d60 100644 (file)
@@ -289,7 +289,6 @@ static void hap_free_p2m_page(struct domain *d, struct page_info *pg)
     d->arch.paging.hap.p2m_pages--;
     d->arch.paging.hap.total_pages++;
     hap_free(d, page_to_mfn(pg));
-    ASSERT(d->arch.paging.hap.p2m_pages >= 0);
 
     paging_unlock(d);
 }