From: Mathieu Desnoyers Date: Tue, 3 Dec 2013 17:04:17 +0000 (+0100) Subject: baddr: get session under lock X-Git-Tag: v2.4.0-rc2~6 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=76b82fc001c026d676057dd5772db3eb55f9b0ba;p=lttng-ust.git baddr: get session under lock Signed-off-by: Mathieu Desnoyers --- diff --git a/liblttng-ust/lttng-ust-baddr.c b/liblttng-ust/lttng-ust-baddr.c index 001103a2..aa66dccf 100644 --- a/liblttng-ust/lttng-ust-baddr.c +++ b/liblttng-ust/lttng-ust-baddr.c @@ -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;