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-prev] [day] [month] [year] [list]
Date:	Thu, 4 Jun 2015 16:39:53 +0800
From:	yalin wang <yalin.wang2010@...il.com>
To:	Tejun Heo <tj@...nel.org>
Cc:	Andrew Morton <akpm@...ux-foundation.org>, laijs@...fujitsu.com,
	nacc@...ux.vnet.ibm.com, penguin-kernel@...ove.sakura.ne.jp,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: Fwd: [RFC] make kthread_worker_fn to be freezable

2015-06-03 13:20 GMT+08:00 Tejun Heo <tj@...nel.org>:
> On Tue, Jun 02, 2015 at 11:13:44AM +0800, yalin wang wrote:
>> this means i need create kthread like this :
>>
>> struct task_struct *kworker_task = kthread_run(kthread_worker_fn,
>> &worker, "nvme%d", dev->instance);
>> kworker_task->flags &= ~PF_NOFREEZE;
>> is it safe to do like this ?
>
> It's not.
>
>> i don't see an API to set other thread to be freezable .
>> only set_freezable() , which set the current thread to be freezable .
>
> But you can create a wrapper kthread function which sets freezable and
> calls kthread_worker_fn().
>
oh,  got it, i see your meaning,
Thanks a lot !
--
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