Commit c5b5138c authored by Linus Torvalds's avatar Linus Torvalds

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
parents db77bef5 0266def9
...@@ -604,6 +604,7 @@ int alloc_xenballooned_pages(int nr_pages, struct page **pages) ...@@ -604,6 +604,7 @@ int alloc_xenballooned_pages(int nr_pages, struct page **pages)
while (pgno < nr_pages) { while (pgno < nr_pages) {
page = balloon_retrieve(true); page = balloon_retrieve(true);
if (page) { if (page) {
__ClearPageOffline(page);
pages[pgno++] = page; pages[pgno++] = page;
#ifdef CONFIG_XEN_HAVE_PVMMU #ifdef CONFIG_XEN_HAVE_PVMMU
/* /*
...@@ -645,8 +646,10 @@ void free_xenballooned_pages(int nr_pages, struct page **pages) ...@@ -645,8 +646,10 @@ void free_xenballooned_pages(int nr_pages, struct page **pages)
mutex_lock(&balloon_mutex); mutex_lock(&balloon_mutex);
for (i = 0; i < nr_pages; i++) { for (i = 0; i < nr_pages; i++) {
if (pages[i]) if (pages[i]) {
__SetPageOffline(pages[i]);
balloon_append(pages[i]); balloon_append(pages[i]);
}
} }
balloon_stats.target_unpopulated -= nr_pages; balloon_stats.target_unpopulated -= nr_pages;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment