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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080701210300.GA3272@ami.dom.local>
Date:	Tue, 1 Jul 2008 23:03:00 +0200
From:	Jarek Poplawski <jarkao2@...il.com>
To:	Oleg Nesterov <oleg@...sign.ru>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Jarek Poplawski <jarkao2@...pl>,
	Max Krasnyansky <maxk@...lcomm.com>,
	Peter Zijlstra <peterz@...radead.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] workqueues: implement flush_work()

On Tue, Jul 01, 2008 at 04:50:18PM +0400, Oleg Nesterov wrote:
...
> Yes, cwq can be "stale", but this doesn't matter and we can't have
> the false positive here.
> 
> cwq->current_work is always changed under cwq->lock, and we hold this
> lock. If we see "cwq->current_work == work" we can safely insert the
> barrier and wait. Even if this work was already re-queued on another
> CPU or another workqueue_struct.
> 
> Note also that rmb() can't really help here.

Right! The question is how "stale" this cwq could be when read without
any lock or barrier. Of course, there can't be the false positive, but
I wonder if we really do enough, to check if a work isn't current on
some other cwq, even without any immediate re-queuing.

Thanks for the explanation,
Jarek P.
--
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