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
| ||
|
Date: Thu, 2 Nov 2017 17:48:08 +0100 From: Peter Zijlstra <peterz@...radead.org> To: David Howells <dhowells@...hat.com> Cc: 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 On Thu, Nov 02, 2017 at 04:45:51PM +0000, David Howells wrote: > 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? Yeah sure ;-)
Powered by blists - more mailing lists