Skip to content

Commit c5ad81e

Browse files
davidhildenbrandbostrovs
authored andcommitted
xen/balloon: Set pages PageOffline() in balloon_add_region()
We are missing a __SetPageOffline(), which is why we can get !PageOffline() pages onto the balloon list, where alloc_xenballooned_pages() will complain: page:ffffea0003e7ffc0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 flags: 0xffffe00001000(reserved) raw: 000ffffe00001000 dead000000000100 dead000000000200 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000 page dumped because: VM_BUG_ON_PAGE(!PageOffline(page)) ------------[ cut here ]------------ kernel BUG at include/linux/page-flags.h:744! invalid opcode: 0000 [#1] SMP NOPTI Reported-by: Marek Marczykowski-Górecki <[email protected]> Tested-by: Marek Marczykowski-Górecki <[email protected]> Fixes: 77c4adf ("xen/balloon: mark inflated pages PG_offline") Cc: [email protected] # v5.1+ Cc: Boris Ostrovsky <[email protected]> Cc: Juergen Gross <[email protected]> Cc: Stefano Stabellini <[email protected]> Signed-off-by: David Hildenbrand <[email protected]> Reviewed-by: Boris Ostrovsky <[email protected]> Signed-off-by: Boris Ostrovsky <[email protected]>
1 parent ade77a2 commit c5ad81e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/xen/balloon.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,7 @@ static void __init balloon_add_region(unsigned long start_pfn,
688688
/* totalram_pages and totalhigh_pages do not
689689
include the boot-time balloon extension, so
690690
don't subtract from it. */
691+
__SetPageOffline(page);
691692
__balloon_append(page);
692693
}
693694

0 commit comments

Comments
 (0)