diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c index ff6660f1fa68..a8e0836dffd4 100644 --- a/drivers/xen/balloon.c +++ b/drivers/xen/balloon.c @@ -633,11 +633,13 @@ static int add_ballooned_pages(int nr_pages) if (xen_hotplug_unpopulated) { st = reserve_additional_memory(); if (st != BP_ECANCELED) { + int rc; + mutex_unlock(&balloon_mutex); - wait_event(balloon_wq, + rc = wait_event_interruptible(balloon_wq, !list_empty(&ballooned_pages)); mutex_lock(&balloon_mutex); - return 0; + return rc ? -ENOMEM : 0; } }