|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] xen: Do not BUG_ON page count_info in fre
# 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 <=
|
|
|
|
|