Skip to content

Commit c5b5138

Browse files
committed
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
2 parents db77bef + 0266def commit c5b5138

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/xen/balloon.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,6 +604,7 @@ int alloc_xenballooned_pages(int nr_pages, struct page **pages)
604604
while (pgno < nr_pages) {
605605
page = balloon_retrieve(true);
606606
if (page) {
607+
__ClearPageOffline(page);
607608
pages[pgno++] = page;
608609
#ifdef CONFIG_XEN_HAVE_PVMMU
609610
/*
@@ -645,8 +646,10 @@ void free_xenballooned_pages(int nr_pages, struct page **pages)
645646
mutex_lock(&balloon_mutex);
646647

647648
for (i = 0; i < nr_pages; i++) {
648-
if (pages[i])
649+
if (pages[i]) {
650+
__SetPageOffline(pages[i]);
649651
balloon_append(pages[i]);
652+
}
650653
}
651654

652655
balloon_stats.target_unpopulated -= nr_pages;

0 commit comments

Comments
 (0)