[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] Don't scrub broken pages



Don't scrub broken pages

Don't touch the poison pages when scrub the pages. Consuming poison page will 
contaminate the CPU context and may cause system crash.

Signed-off-by: Jiang, Yunhong <yunhong.jiang@xxxxxxxxx>

diff -r 08c3ff62b8e9 xen/common/page_alloc.c
--- a/xen/common/page_alloc.c   Mon Feb 08 13:27:41 2010 +0800
+++ b/xen/common/page_alloc.c   Mon Feb 08 14:32:32 2010 +0800
@@ -1256,6 +1256,9 @@ void scrub_one_page(struct page_info *pg
 {
     void *p = __map_domain_page(pg);
 
+    if ( unlikely(pg->count_info & PGC_broken) )
+        return;
+
 #ifndef NDEBUG
     /* Avoid callers relying on allocations returning zeroed pages. */
     memset(p, 0xc2, PAGE_SIZE);


Attachment: scrub_page.patch
Description: scrub_page.patch

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.