lkml.org 
[lkml]   [2009]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] xen: handle highmem pages correctly when shrinking a domain
Date
From
This commit causes a crash if the page being released is a highmem
page.

commit 1058a75f07b9bb8323fb5197be5526220f8b75cf
Author: Dan Magenheimer <dan.magenheimer@oracle.com>
Date: Thu Jan 22 14:36:08 2009 -0800

xen: actually release memory when shrinking domain

If a page is highmem then there is no need to unmap it.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: dan.magenheimer@oracle.com <dan.magenheimer@oracle.com>
Cc: Xen-devel <xen-devel@lists.xensource.com>
Cc: Stable Kernel <stable@kernel.org>
---
drivers/xen/balloon.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)

diff -r 7f26a03c3e02 -r 70c0102ea4c1 drivers/xen/balloon.c
--- a/drivers/xen/balloon.c Fri Jan 23 14:14:59 2009 +0000
+++ b/drivers/xen/balloon.c Fri Jan 23 16:24:09 2009 +0000
@@ -292,10 +292,13 @@

scrub_page(page);

- ret = HYPERVISOR_update_va_mapping(
- (unsigned long)__va(pfn << PAGE_SHIFT),
- __pte_ma(0), 0);
- BUG_ON(ret);
+ if (!PageHighMem(page)) {
+ ret = HYPERVISOR_update_va_mapping(
+ (unsigned long)__va(pfn << PAGE_SHIFT),
+ __pte_ma(0), 0);
+ BUG_ON(ret);
+ }
+
}

/* Ensure that ballooned highmem pages don't have kmaps. */

\
 
 \ /
  Last update: 2009-01-23 17:29    [W:0.039 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site