X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=liblttng-ust%2Flttng-ust-baddr.c;h=681ba543bcd0ad6ab417b6a04e11c983021a95b1;hb=3327ac33b865cf2ee76934ded1c4b3b177edc3b9;hp=567741ad5fc36c5d4e04542f52175722bf010835;hpb=9e16611568f395e9b646ecee0906a5a1e3bb7110;p=lttng-ust.git diff --git a/liblttng-ust/lttng-ust-baddr.c b/liblttng-ust/lttng-ust-baddr.c index 567741ad..681ba543 100644 --- a/liblttng-ust/lttng-ust-baddr.c +++ b/liblttng-ust/lttng-ust-baddr.c @@ -91,7 +91,14 @@ int extract_soinfo_events(struct dl_phdr_info *info, size_t size, void *data) * UST lock needs to be nested within dynamic loader * lock. */ - ust_lock(); + if (ust_lock()) { + /* + * Stop iteration on headers if need to exit. + */ + ust_unlock(); + return 1; + } + sessionsp = _lttng_get_sessions(); cds_list_for_each_entry(session, sessionsp, node) { if (session->owner != owner) @@ -104,7 +111,6 @@ int extract_soinfo_events(struct dl_phdr_info *info, size_t size, void *data) sostat.st_mtime); } ust_unlock(); - /* * We are only interested in the base address (lowest virtual * address associated with the memory image), skip the rest