diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-03-17 12:16:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-03-17 12:16:22 -0400 |
commit | c5b5138cdb2f833a22cfa36c95d6ee41e98a0a34 (patch) | |
tree | 3b7f3452e20b251ce946704b29609b5a74b29bfd | |
parent | db77bef53ba6ba5205ac1788bb8b66ce141ab020 (diff) | |
parent | 0266def913771e718fd0c998eecb072e0685e2c9 (diff) |
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
-rw-r--r-- | drivers/xen/balloon.c | 5 |
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) | |||
604 | while (pgno < nr_pages) { | 604 | while (pgno < nr_pages) { |
605 | page = balloon_retrieve(true); | 605 | page = balloon_retrieve(true); |
606 | if (page) { | 606 | if (page) { |
607 | __ClearPageOffline(page); | ||
607 | pages[pgno++] = page; | 608 | pages[pgno++] = page; |
608 | #ifdef CONFIG_XEN_HAVE_PVMMU | 609 | #ifdef CONFIG_XEN_HAVE_PVMMU |
609 | /* | 610 | /* |
@@ -645,8 +646,10 @@ void free_xenballooned_pages(int nr_pages, struct page **pages) | |||
645 | mutex_lock(&balloon_mutex); | 646 | mutex_lock(&balloon_mutex); |
646 | 647 | ||
647 | for (i = 0; i < nr_pages; i++) { | 648 | for (i = 0; i < nr_pages; i++) { |
648 | if (pages[i]) | 649 | if (pages[i]) { |
650 | __SetPageOffline(pages[i]); | ||
649 | balloon_append(pages[i]); | 651 | balloon_append(pages[i]); |
652 | } | ||
650 | } | 653 | } |
651 | 654 | ||
652 | balloon_stats.target_unpopulated -= nr_pages; | 655 | balloon_stats.target_unpopulated -= nr_pages; |