From: Pierre-Marc Fournier Date: Fri, 18 Dec 2009 19:23:55 +0000 (-0500) Subject: port fix from lttng kernel tracer 0.92 X-Git-Tag: v1.9.1~804 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=4292ed8a2fd23d186b7d3a5985a3f219948e6796;p=lttng-ust.git port fix from lttng kernel tracer 0.92 --- diff --git a/libust/buffers.c b/libust/buffers.c index b7b2318c..c2928c03 100644 --- a/libust/buffers.c +++ b/libust/buffers.c @@ -482,6 +482,13 @@ static void ltt_relay_print_errors(struct ltt_trace_struct *trace, struct ust_buffer *ltt_buf = channel->buf; long cons_off; + /* + * Can be called in the error path of allocation when + * trans_channel_data is not yet set. + */ + if (!channel) + return; + for (cons_off = atomic_long_read(<t_buf->consumed); (SUBBUF_TRUNC(local_read(<t_buf->offset), channel)