[lttng-dev] [LTTNG-TOOLS PATCH] Fix: increment channel refcount on add_stream

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Mon Jul 8 10:49:18 EDT 2013


* Julien Desfossez (jdesfossez at efficios.com) wrote:
> Signed-off-by: Julien Desfossez <jdesfossez at efficios.com>

This patch was merged into master and stable-2.2 of lttng-tools.

> ---
>  src/common/consumer.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/src/common/consumer.c b/src/common/consumer.c
> index c9e4bae..bfb809a 100644
> --- a/src/common/consumer.c
> +++ b/src/common/consumer.c
> @@ -663,6 +663,9 @@ static int add_stream(struct lttng_consumer_stream *stream,
>  		uatomic_inc(&relayd->refcount);
>  	}
>  
> +	/* Update channel refcount once added without error(s). */
> +	uatomic_inc(&stream->chan->refcount);
> +
>  	/*
>  	 * When nb_init_stream_left reaches 0, we don't need to trigger any action
>  	 * in terms of destroying the associated channel, because the action that
> -- 
> 1.7.10.4
> 
> 
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list