From: Mathieu Desnoyers Date: Fri, 26 Aug 2011 15:52:22 +0000 (-0400) Subject: lib ring buffer must take private pointer copy before decrementing refcount X-Git-Tag: v2.0-pre9~69^2 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=ba1d61bc8909b4796516221bf97130631e8d0bc6;p=lttng-modules.git lib ring buffer must take private pointer copy before decrementing refcount Signed-off-by: Mathieu Desnoyers --- diff --git a/lib/ringbuffer/ring_buffer_frontend.c b/lib/ringbuffer/ring_buffer_frontend.c index 6a4c241e..3003dd83 100644 --- a/lib/ringbuffer/ring_buffer_frontend.c +++ b/lib/ringbuffer/ring_buffer_frontend.c @@ -752,8 +752,8 @@ void *channel_destroy(struct channel *chan) ACCESS_ONCE(chan->finalized) = 1; wake_up_interruptible(&chan->hp_wait); wake_up_interruptible(&chan->read_wait); - kref_put(&chan->ref, channel_release); priv = chan->backend.priv; + kref_put(&chan->ref, channel_release); return priv; } EXPORT_SYMBOL_GPL(channel_destroy);