Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 84a139a9 authored by Marcelo Tosatti's avatar Marcelo Tosatti Committed by Rusty Russell
Browse files

virtio: fix suspend when using virtio_balloon



Break out of wait_event_interruptible() if freezing has been requested,
in the vballoon thread. Without this change vballoon refuses to stop and
the system can't suspend.

Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
Cc: stable@kernel.org
parent a489f0b5
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -190,7 +190,8 @@ static int balloon(void *_vballoon)
		try_to_freeze();
		try_to_freeze();
		wait_event_interruptible(vb->config_change,
		wait_event_interruptible(vb->config_change,
					 (diff = towards_target(vb)) != 0
					 (diff = towards_target(vb)) != 0
					 || kthread_should_stop());
					 || kthread_should_stop()
					 || freezing(current));
		if (diff > 0)
		if (diff > 0)
			fill_balloon(vb, diff);
			fill_balloon(vb, diff);
		else if (diff < 0)
		else if (diff < 0)