From: David Goulet Date: Tue, 13 Mar 2012 15:13:25 +0000 (-0400) Subject: Fix double PID registration race X-Git-Tag: v2.0.0-rc3~5 X-Git-Url: http://git.liburcu.org/?a=commitdiff_plain;ds=inline;h=852d003742c637d479f91767b853aa85eb0ef258;hp=852d003742c637d479f91767b853aa85eb0ef258;p=lttng-tools.git Fix double PID registration race Introduce a second hash table indexed by application socket which have the exact same content as the hash table indexed by PID. On unregister, we now use a direct lookup per socket instead of using the key map between sock and PID. This prevents the PID-sock lookup race when the unregister happens just after the replace and before the close(fd). We also use an add_replace call on application registration for the PID hash table and kept the add_unique for the socket hash table. (closes #7) Acked-by: Mathieu Desnoyers Signed-off-by: David Goulet ---