]> git.itanic.dy.fi Git - linux-stable/commitdiff
xen/balloon: fix balloon kthread freezing
authorJuergen Gross <jgross@suse.com>
Mon, 20 Sep 2021 10:03:45 +0000 (12:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Oct 2021 13:05:07 +0000 (15:05 +0200)
commit 96f5bd03e1be606987644b71899ea56a8d05f825 upstream.

Commit 8480ed9c2bbd56 ("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: 8480ed9c2bbd56 ("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>
drivers/xen/balloon.c

index b9abe3ef218826951ba8a92bac25a24df20dfd87..a697c64a65067af88c8936b901d53d013c6b3a1f 100644 (file)
@@ -602,8 +602,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;