提交 8269b04a 编写于 作者: J Juergen Gross 提交者: Zheng Zengkai

xen/balloon: fix balloon kthread freezing

stable inclusion
from stable-5.10.70
commit 35c0dfbbd3448f6c6e71d513a85fd0acec6aa325
bugzilla: 182949 https://gitee.com/openeuler/kernel/issues/I4I3GQ

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=35c0dfbbd3448f6c6e71d513a85fd0acec6aa325

--------------------------------

commit 96f5bd03 upstream.

Commit 8480ed9c ("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: 8480ed9c ("xen/balloon: use a kernel thread instead a workqueue")
Signed-off-by: NJuergen Gross <jgross@suse.com>
Reviewed-by: NBoris Ostrovsky <boris.ostrovsky@oracle.com>
Link: https://lore.kernel.org/r/20210920100345.21939-1-jgross@suse.comSigned-off-by: NJuergen Gross <jgross@suse.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: NWeilong Chen <chenweilong@huawei.com>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 114aa0a1
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册