mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
ksmbd: Add missing set_freezable() for freezable kthread
From: Kevin Hao <haokexin@gmail.com> [ Upstream commit 8fb7b723924cc9306bc161f45496497aec733904 ] The kernel thread function ksmbd_conn_handler_loop() invokes the try_to_freeze() in its loop. But all the kernel threads are non-freezable by default. So if we want to make a kernel thread to be freezable, we have to invoke set_freezable() explicitly. Signed-off-by: Kevin Hao <haokexin@gmail.com> Acked-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Steve French <stfrench@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
844dfef316
commit
b1c06ee2d1
@@ -284,6 +284,7 @@ int ksmbd_conn_handler_loop(void *p)
|
|||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
conn->last_active = jiffies;
|
conn->last_active = jiffies;
|
||||||
|
set_freezable();
|
||||||
while (ksmbd_conn_alive(conn)) {
|
while (ksmbd_conn_alive(conn)) {
|
||||||
if (try_to_freeze())
|
if (try_to_freeze())
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user