Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

xen/balloon: make the balloon wait interruptible

So it can be killed, or else processes can get hung indefinitely
waiting for balloon pages.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20200727091342.52325-3-roger.pau@citrix.com
Signed-off-by: Juergen Gross <jgross@suse.com>

authored by

Roger Pau Monne and committed by
Juergen Gross
88a479ff 1951fa33

+4 -2
+4 -2
drivers/xen/balloon.c
··· 568 568 if (xen_hotplug_unpopulated) { 569 569 st = reserve_additional_memory(); 570 570 if (st != BP_ECANCELED) { 571 + int rc; 572 + 571 573 mutex_unlock(&balloon_mutex); 572 - wait_event(balloon_wq, 574 + rc = wait_event_interruptible(balloon_wq, 573 575 !list_empty(&ballooned_pages)); 574 576 mutex_lock(&balloon_mutex); 575 - return 0; 577 + return rc ? -ENOMEM : 0; 576 578 } 577 579 } 578 580