diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2010-02-08 10:18:14 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2010-02-08 10:18:14 +0000 |
commit | 407b049aebf00b916e2b196c444a6a79ea064fd5 (patch) | |
tree | 0d3e198d24dbeda03fb824b2856fe35036582cf3 | |
parent | e0e58ddbf357108ffc0e7db8611f8623d4c68c55 (diff) | |
download | xen-407b049aebf00b916e2b196c444a6a79ea064fd5.tar.gz xen-407b049aebf00b916e2b196c444a6a79ea064fd5.tar.bz2 xen-407b049aebf00b916e2b196c444a6a79ea064fd5.zip |
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@intel.com>
-rw-r--r-- | xen/common/page_alloc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c index 0e1925a3bb..735c207e80 100644 --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -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); |