aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/xen/balloon.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-03-17 09:16:22 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2019-03-17 09:16:22 -0700
commitc5b5138cdb2f833a22cfa36c95d6ee41e98a0a34 (patch)
tree3b7f3452e20b251ce946704b29609b5a74b29bfd /drivers/xen/balloon.c
parentMerge tag '9p-for-5.1' of git://github.com/martinetd/linux (diff)
parentxen/balloon: Fix mapping PG_offline pages to user space (diff)
downloadlinux-dev-c5b5138cdb2f833a22cfa36c95d6ee41e98a0a34.tar.xz
linux-dev-c5b5138cdb2f833a22cfa36c95d6ee41e98a0a34.zip
Merge tag 'for-linus-5.1b-rc1b-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip
Pull xen fix from Juergen Gross: "A fix for a Xen bug introduced by David's series for excluding ballooned pages in vmcores" * tag 'for-linus-5.1b-rc1b-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/balloon: Fix mapping PG_offline pages to user space
Diffstat (limited to 'drivers/xen/balloon.c')
-rw-r--r--drivers/xen/balloon.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c
index 39b229f9e256..d37dd5bb7a8f 100644
--- a/drivers/xen/balloon.c
+++ b/drivers/xen/balloon.c
@@ -604,6 +604,7 @@ int alloc_xenballooned_pages(int nr_pages, struct page **pages)
while (pgno < nr_pages) {
page = balloon_retrieve(true);
if (page) {
+ __ClearPageOffline(page);
pages[pgno++] = page;
#ifdef CONFIG_XEN_HAVE_PVMMU
/*
@@ -645,8 +646,10 @@ void free_xenballooned_pages(int nr_pages, struct page **pages)
mutex_lock(&balloon_mutex);
for (i = 0; i < nr_pages; i++) {
- if (pages[i])
+ if (pages[i]) {
+ __SetPageOffline(pages[i]);
balloon_append(pages[i]);
+ }
}
balloon_stats.target_unpopulated -= nr_pages;