All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen/balloon: fix balloon kthread freezing
@ 2021-09-20 10:03 Juergen Gross
  2021-09-20 19:29 ` Boris Ostrovsky
  0 siblings, 1 reply; 2+ messages in thread
From: Juergen Gross @ 2021-09-20 10:03 UTC (permalink / raw)
  To: xen-devel, linux-kernel
  Cc: Juergen Gross, Boris Ostrovsky, Stefano Stabellini

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>
---
 drivers/xen/balloon.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c
index 2d2803883306..43ebfe36ac27 100644
--- a/drivers/xen/balloon.c
+++ b/drivers/xen/balloon.c
@@ -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;
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] xen/balloon: fix balloon kthread freezing
  2021-09-20 10:03 [PATCH] xen/balloon: fix balloon kthread freezing Juergen Gross
@ 2021-09-20 19:29 ` Boris Ostrovsky
  0 siblings, 0 replies; 2+ messages in thread
From: Boris Ostrovsky @ 2021-09-20 19:29 UTC (permalink / raw)
  To: Juergen Gross, xen-devel, linux-kernel; +Cc: Stefano Stabellini


On 9/20/21 6:03 AM, Juergen Gross wrote:
> 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>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-20 19:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-20 10:03 [PATCH] xen/balloon: fix balloon kthread freezing Juergen Gross
2021-09-20 19:29 ` Boris Ostrovsky

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.