From: Mathieu Desnoyers Date: Tue, 10 Jan 2012 20:25:34 +0000 (-0500) Subject: Remove application from socket hash table upon unregister X-Git-Tag: v2.0-pre17~30 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=886459c6c3217ac70b249e2a717622edd9e7b4dc;p=lttng-tools.git Remove application from socket hash table upon unregister Signed-off-by: Mathieu Desnoyers --- diff --git a/lttng-sessiond/ust-app.c b/lttng-sessiond/ust-app.c index 8bfb6b264..9c500481e 100644 --- a/lttng-sessiond/ust-app.c +++ b/lttng-sessiond/ust-app.c @@ -1299,6 +1299,11 @@ void ust_app_unregister(int sock) DBG("PID %d unregistering with sock %d", lta->key.pid, sock); + /* Remove application from socket hash table */ + lttng_ht_lookup(ust_app_sock_key_map, (void *)((unsigned long) sock), &iter); + ret = lttng_ht_del(ust_app_sock_key_map, &iter); + assert(!ret); + /* Get the node reference for a call_rcu */ lttng_ht_lookup(ust_app_ht, (void *)((unsigned long) lta->key.pid), &iter); node = lttng_ht_iter_get_node_ulong(&iter); @@ -1307,6 +1312,7 @@ void ust_app_unregister(int sock) goto error; } + /* Remove application from PID hash table */ ret = lttng_ht_del(ust_app_ht, &iter); assert(!ret); call_rcu(&node->head, delete_ust_app_rcu);