Skip to content

Commit

Permalink
xen/balloon: fix balloon kthread freezing
Browse files Browse the repository at this point in the history
Commit 8480ed9 ("xen/balloon: use a kernel thread instead a
workqueue") switched the Xen balloon driver to use a kernel thread.
Unfortunately the patch omitted to call try_to_freeze() or to use
wait_event_freezable_timeout(), causing a system suspend to fail.

Fixes: 8480ed9 ("xen/balloon: use a kernel thread instead a workqueue")
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Link: https://lore.kernel.org/r/20210920100345.21939-1-jgross@suse.com
Signed-off-by: Juergen Gross <jgross@suse.com>
  • Loading branch information
jgross1 committed Sep 21, 2021
1 parent 794d5b8 commit 96f5bd0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/xen/balloon.c
Original file line number Diff line number Diff line change
Expand Up @@ -522,8 +522,8 @@ static int balloon_thread(void *unused)
timeout = 3600 * HZ;
credit = current_credit();

wait_event_interruptible_timeout(balloon_thread_wq,
balloon_thread_cond(state, credit), timeout);
wait_event_freezable_timeout(balloon_thread_wq,
balloon_thread_cond(state, credit), timeout);

if (kthread_should_stop())
return 0;
Expand Down

0 comments on commit 96f5bd0

Please sign in to comment.