Skip to content

Commit

Permalink
xen/balloon: fix balloon kthread freezing
Browse files Browse the repository at this point in the history
commit 96f5bd0 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
jgross1 authored and gregkh committed Sep 30, 2021
1 parent 8ea7503 commit f67f85e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/xen/balloon.c
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 f67f85e

Please sign in to comment.