From: Ian Campbell <ian.campbell@citrix.com>
To: linux-kernel@vger.kernel.org
Cc: Jeremy Fitzhardinge <jeremy@goop.org>,
Ingo Molnar <mingo@elte.hu>,
"dan.magenheimer@oracle.com" <dan.magenheimer@oracle.com>,
Xen-devel <xen-devel@lists.xensource.com>,
Stable Kernel <stable@kernel.org>
Subject: [PATCH] xen: handle highmem pages correctly when shrinking a domain
Date: Fri, 23 Jan 2009 16:26:21 +0000 [thread overview]
Message-ID: <70c0102ea4c18ecab426.1232727981@localhost.localdomain> (raw)
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. */
next reply other threads:[~2009-01-23 16:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-23 16:26 Ian Campbell [this message]
2009-01-23 17:56 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=70c0102ea4c18ecab426.1232727981@localhost.localdomain \
--to=ian.campbell@citrix.com \
--cc=dan.magenheimer@oracle.com \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=stable@kernel.org \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®