X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=liblttng-ust%2Flttng-ust-comm.c;h=7cd6a227d66c3bede0f7e244a02038c2c8de668b;hb=4c62d8d195fb07d3bc64b6a81836d2a5be4abcf3;hp=4a21866358b66a4d9f766abdfd47665e2cffe13d;hpb=ebb9f8ffff8bf3a922073143bd16825140450b98;p=lttng-ust.git diff --git a/liblttng-ust/lttng-ust-comm.c b/liblttng-ust/lttng-ust-comm.c index 4a218663..7cd6a227 100644 --- a/liblttng-ust/lttng-ust-comm.c +++ b/liblttng-ust/lttng-ust-comm.c @@ -956,6 +956,21 @@ int handle_message(struct sock_info *sock_info, } } DBG("Return value: %d", lur.ret_val); + + ust_unlock(); + + /* + * Performed delayed statedump operations outside of the UST + * lock. We need to take the dynamic loader lock before we take + * the UST lock internally within handle_pending_statedump(). + */ + handle_pending_statedump(sock_info); + + if (ust_lock()) { + ret = -LTTNG_UST_ERR_EXITING; + goto error; + } + ret = send_reply(sock, &lur); if (ret < 0) { DBG("error sending reply"); @@ -986,13 +1001,6 @@ int handle_message(struct sock_info *sock_info, error: ust_unlock(); - /* - * Performed delayed statedump operations outside of the UST - * lock. We need to take the dynamic loader lock before we take - * the UST lock internally within handle_pending_statedump(). - */ - handle_pending_statedump(sock_info); - return ret; }