Fix double PID registration race
authorDavid Goulet <dgoulet@efficios.com>
Tue, 13 Mar 2012 15:13:25 +0000 (11:13 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Tue, 13 Mar 2012 18:33:07 +0000 (14:33 -0400)
commit852d003742c637d479f91767b853aa85eb0ef258
treeec9b4904b980f0411d1d702363894f0156992e43
parentd31efcff675bdd407f300de4ad971b74abb0c38f
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 <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng-sessiond/ust-app.c
src/bin/lttng-sessiond/ust-app.h
src/common/hashtable/hashtable.h
This page took 0.026596 seconds and 5 git commands to generate.