Skip to content

Commit

Permalink
Merge tag 'for-linus-5.1b-rc1b-tag' of git://git.kernel.org/pub/scm/l…
Browse files Browse the repository at this point in the history
…inux/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
  • Loading branch information
torvalds committed Mar 17, 2019
2 parents db77bef + 0266def commit c5b5138
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/xen/balloon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
/*
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit c5b5138

Please sign in to comment.