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]
Date:   Thu, 02 Nov 2017 16:45:51 +0000
From:   David Howells <dhowells@...hat.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     dhowells@...hat.com, Ingo Molnar <mingo@...hat.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Pass mode to wait_on_atomic_t() action funcs and provide default actions

Peter Zijlstra <peterz@...radead.org> wrote:

> > The moment atomic_dec_and_test() is called, *net is at liberty to disappear,
> > so there's no way to find a waitqueue - unless that waitqueue is guaranteed
> > not to be deallocated, eg. by being global.
> 
> But any possible wait side will still need to dereference *net at an
> indeterminate point in the future to ascertain the value does now indeed
> read 0.

Yeah, the assumption is that the *wait* side is where the deallocation is
happening.  So I have something like:

	net->live = false; // Tell the cell managers to delete the cells
	...
	foreach (cell)
		queue_work(cell);
	...
	wait_on_atomic_t(&net->cells_outstanding, atomic_t_wait,
			 TASK_UNINTERRUPTIBLE);
	...
	destroy(net);

> ... We can certainly start with your patch, as that does clean things up.

Can I put that down as a Grudgingly-acked-by?

David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ