From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: [PATCH 2/4] x86/hap: Remove bogus assertion in hap_free_p2m_page() Date: Tue, 24 Sep 2013 13:10:36 +0100 Message-ID: <1380024638-14983-3-git-send-email-andrew.cooper3@citrix.com> References: <1380024638-14983-1-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1380024638-14983-1-git-send-email-andrew.cooper3@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Xen-devel Cc: Andrew Cooper , Keir Fraser , Jan Beulich , Tim Deegan List-Id: xen-devel@lists.xenproject.org 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 CC: Keir Fraser CC: Jan Beulich CC: Tim Deegan --- xen/arch/x86/mm/hap/hap.c | 1 - 1 file changed, 1 deletion(-) diff --git a/xen/arch/x86/mm/hap/hap.c b/xen/arch/x86/mm/hap/hap.c index bff05d9..d3f64bd 100644 --- a/xen/arch/x86/mm/hap/hap.c +++ b/xen/arch/x86/mm/hap/hap.c @@ -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); } -- 1.7.10.4