baddr: get session under lock
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 3 Dec 2013 17:04:17 +0000 (18:04 +0100)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 3 Dec 2013 17:04:17 +0000 (18:04 +0100)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
liblttng-ust/lttng-ust-baddr.c

index 001103a283eb32c1f6e5b6c48ad5107ed3b60a1f..aa66dccfe8a243b4e9f948644c0ec5283731e119 100644 (file)
@@ -44,8 +44,6 @@ int extract_soinfo_events(struct dl_phdr_info *info, size_t size, void *data)
        void *owner = data;
        struct cds_list_head *sessionsp;
 
-       sessionsp = _lttng_get_sessions();
-
        for (j = 0; j < info->dlpi_phnum; j++) {
                char resolved_path[PATH_MAX];
                struct stat sostat;
@@ -93,6 +91,7 @@ int extract_soinfo_events(struct dl_phdr_info *info, size_t size, void *data)
                 * lock.
                 */
                ust_lock();
+               sessionsp = _lttng_get_sessions();
                cds_list_for_each_entry(session, sessionsp, node) {
                        if (session->owner != owner)
                                continue;
This page took 0.025936 seconds and 4 git commands to generate.