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: <20090413201348.GA16661@redhat.com>
Date:	Mon, 13 Apr 2009 22:13:48 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	Andrew Morton <akpm@...ux-foundation.org>,
	David Howells <dhowells@...hat.com>,
	David Miller <davem@...emloft.net>
Cc:	Serge Hallyn <serue@...ibm.com>, Steve Dickson <steved@...hat.com>,
	Trond Myklebust <Trond.Myklebust@...app.com>,
	Al Viro <viro@...iv.linux.org.uk>,
	Daire Byrne <Daire.Byrne@...mestore.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] slow_work_execute() needs mb() before
	test_bit(SLOW_WORK_PENDING)

On 04/13, Oleg Nesterov wrote:
>
> slow_work_execute:
>
> 	clear_bit_unlock(SLOW_WORK_EXECUTING, &work->flags);
>
> 	if (test_bit(SLOW_WORK_PENDING, &work->flags) {
>
> clear_bit_unlock() implies release semantics, iow we have a one-way barrier
> before clear_bit(). But we need the mb() semantics after clear_bit(), before
> we test SLOW_WORK_PENDING. Otherwise we can miss SLOW_WORK_ENQ_DEFERRED if
> we race slow_work_enqueue().

However, given that both clear_bit() and set_bit() use the same word, perhaps
this is not possible.

But in that case I don't understand why do we need clear_bit_unlock(), not just
clear_bit(), and how "mb is not needeed" could be derived from documentation.

Oleg.

--
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