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>] [day] [month] [year] [list]
Message-ID: <20191216140219.GD6444@dhcp22.suse.cz>
Date:   Mon, 16 Dec 2019 15:02:19 +0100
From:   Michal Hocko <mhocko@...nel.org>
To:     Hillf Danton <hdanton@...a.com>
Cc:     linux-kernel <linux-kernel@...r.kernel.org>,
        linux-mm <linux-mm@...ck.org>, Tejun Heo <tj@...nel.org>,
        Lai Jiangshan <jiangshanlai@...il.com>
Subject: Re: [RFC] workqueue: fix detecting reentrance

Cc maintainers.

On Thu 12-12-19 17:15:48, Hillf Danton wrote:
> 
> If we can find a valid worker that is serving the specified work at
> the moment then the worker itself is enough to ensure reentrance and
> workqueue doesn't matter here because it is permitted for a work to
> requeue itself either on different cpu or numa node or even on another
> workqueue.

I do not follow what is the actual problem you are trying to fix here.

> Fixes: c9178087acd7 ("workqueue: perform non-reentrancy test when queueing to unbound workqueues too")
> Fixes: 18aa9effad4a ("workqueue: implement WQ_NON_REENTRANT")
> Signed-off-by: Hillf Danton <hdanton@...a.com>
> ---
> 
> --- f/kernel/workqueue.c
> +++ g/kernel/workqueue.c
> @@ -1433,7 +1433,7 @@ retry:
>  
>  		worker = find_worker_executing_work(last_pool, work);
>  
> -		if (worker && worker->current_pwq->wq == wq) {
> +		if (worker) {
>  			pwq = worker->current_pwq;
>  		} else {
>  			/* meh... not running there, queue here */
> 

-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ