From: Jérémie Galarneau Date: Wed, 14 Feb 2018 21:14:21 +0000 (-0500) Subject: Assert that the consumer lock is held while sending FDs to consumerd X-Git-Tag: v2.11.0-rc1~402 X-Git-Url: https://git.lttng.org/?a=commitdiff_plain;h=05dac5980b42afe7b0334b009f43b4e3ba98a319;hp=05dac5980b42afe7b0334b009f43b4e3ba98a319;p=lttng-tools.git Assert that the consumer lock is held while sending FDs to consumerd The consumer_data lock must be held during the communications between the consumerd and sessiond. The consumer_data lock is refered-to by each consumer_socket instance; they point to their consumer's global data lock. The lock can't be taken in consumer_send_msg() or consumer_send_fds() since we want to protect a complete "transaction". Some commands require both functions to be called and we want to hold the lock over the duration of both calls to protect against other threads initiating a communication between the two calls. Signed-off-by: Jérémie Galarneau ---