WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] xen: Do not BUG_ON page count_info in fre

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xen: Do not BUG_ON page count_info in free_domheap_pages().
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 09 Apr 2007 12:30:14 -0700
Delivery-date: Mon, 09 Apr 2007 12:29:14 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir@xxxxxxxxxxxxx>
# Date 1175866483 -3600
# Node ID 6625adf359dc8c64e2da3802585fb378f4863925
# Parent  755207b3c47c6a379229c29d26e0a8d494630940
xen: Do not BUG_ON page count_info in free_domheap_pages().
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/arch/x86/mm/shadow/common.c |    3 ---
 xen/common/page_alloc.c         |   14 +++++++++++++-
 2 files changed, 13 insertions(+), 4 deletions(-)

diff -r 755207b3c47c -r 6625adf359dc xen/arch/x86/mm/shadow/common.c
--- a/xen/arch/x86/mm/shadow/common.c   Fri Apr 06 11:27:36 2007 +0100
+++ b/xen/arch/x86/mm/shadow/common.c   Fri Apr 06 14:34:43 2007 +0100
@@ -1245,9 +1245,6 @@ static unsigned int sh_set_allocation(st
             list_del(&sp->list);
             d->arch.paging.shadow.free_pages -= 1<<SHADOW_MAX_ORDER;
             d->arch.paging.shadow.total_pages -= 1<<SHADOW_MAX_ORDER;
-            for ( j = 0; j < 1<<SHADOW_MAX_ORDER; j++ ) 
-                /* Keep the page allocator happy */
-                ((struct page_info *)sp)[j].count_info = 0;
             free_domheap_pages((struct page_info *)sp, SHADOW_MAX_ORDER);
         }
 
diff -r 755207b3c47c -r 6625adf359dc xen/common/page_alloc.c
--- a/xen/common/page_alloc.c   Fri Apr 06 11:27:36 2007 +0100
+++ b/xen/common/page_alloc.c   Fri Apr 06 14:34:43 2007 +0100
@@ -445,7 +445,19 @@ static void free_heap_pages(
 
     for ( i = 0; i < (1 << order); i++ )
     {
-        BUG_ON(pg[i].count_info != 0);
+        /*
+         * Cannot assume that count_info == 0, as there are some corner cases
+         * where it isn't the case and yet it isn't a bug:
+         *  1. page_get_owner() is NULL
+         *  2. page_get_owner() is a domain that was never accessible by
+         *     its domid (e.g., failed to fully construct the domain).
+         *  3. page was never addressable by the guest (e.g., it's an
+         *     auto-translate-physmap guest and the page was never included
+         *     in its pseudophysical address space).
+         * In all the above cases there can be no guest mappings of this page.
+         */
+        pg[i].count_info = 0;
+
         if ( (d = page_get_owner(&pg[i])) != NULL )
         {
             pg[i].tlbflush_timestamp = tlbflush_current_time();

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xen: Do not BUG_ON page count_info in free_domheap_pages()., Xen patchbot-unstable <=