Skip to contentSkip to conversation

virtio-balloon: check for freezer in kthread loop

PATCH Applied Marcelo Tosatti 2 participants 3 messages Apr 17, 2009 – Apr 19, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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.

drivers/virtio/virtio_balloon.c +2 -1
index 5926826..9c76a06 100644
@@ -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)
#1 lore raw
Quoted 6 lines · Marcelo Tosatti

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.

-stable too, yeah?

Applied,
Rusty.

#2 lore raw
Quoted 9 lines · Rusty Russell
Quoted 6 lines · Marcelo Tosatti

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.

-stable too, yeah?

Its not a critical bugfix, at least for me.