+ struct cds_lfht_node *node;
+ struct ust_app_key *key;
+ struct cds_lfht_iter iter;
+ //struct ust_app *app;
+
+ rcu_read_lock();
+
+ node = hashtable_lookup(ust_app_sock_key_map,
+ (void *)((unsigned long) sock), sizeof(void *), &iter);
+ if (node == NULL) {
+ DBG2("UST app find by sock %d key not found", sock);
+ rcu_read_unlock();
+ goto error;
+ }
+
+ key = caa_container_of(node, struct ust_app_key, node);
+
+ node = hashtable_lookup(ust_app_ht,
+ (void *)((unsigned long) key->pid), sizeof(void *), &iter);
+ if (node == NULL) {
+ DBG2("UST app find by sock %d not found", sock);
+ rcu_read_unlock();
+ goto error;
+ }
+ rcu_read_unlock();
+
+ return caa_container_of(node, struct ust_app, node);
+
+error:
+ return NULL;