Skip to content

Commit

Permalink
virtio: fix suspend when using virtio_balloon
Browse files Browse the repository at this point in the history
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: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: stable@kernel.org
  • Loading branch information
Marcelo Tosatti authored and Rusty Russell committed Apr 19, 2009
1 parent a489f0b commit 84a139a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/virtio/virtio_balloon.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ static int balloon(void *_vballoon)
try_to_freeze();
wait_event_interruptible(vb->config_change,
(diff = towards_target(vb)) != 0
|| kthread_should_stop());
|| kthread_should_stop()
|| freezing(current));
if (diff > 0)
fill_balloon(vb, diff);
else if (diff < 0)
Expand Down

0 comments on commit 84a139a

Please sign in to comment.