lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 1 Jun 2015 18:05:58 +0800
From:	yalin wang <yalin.wang2010@...il.com>
To:	Andrew Morton <akpm@...ux-foundation.org>, laijs@...fujitsu.com,
	tj@...nel.org, nacc@...ux.vnet.ibm.com,
	penguin-kernel@...ove.sakura.ne.jp,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Fwd: [RFC] make kthread_worker_fn to be freezable

I notice that kthread_worker_fn() call try_to_freeze() function,
but it don't make itself to be a freezable kthread,
kthread default behavior is not freezable, we should change it if
want try_to_freeze() work correctly.

Signed-off-by: yalin wang <yalin.wang2010@...il.com>
---
 kernel/kthread.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/kthread.c b/kernel/kthread.c
index 10e489c..b20a21d 100644
--- a/kernel/kthread.c
+++ b/kernel/kthread.c
@@ -550,6 +550,7 @@ int kthread_worker_fn(void *worker_ptr)

        WARN_ON(worker->task);
        worker->task = current;
+       set_freezable();
 repeat:
        set_current_state(TASK_INTERRUPTIBLE);  /* mb paired w/ kthread_stop */

--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ