From: Mathieu Desnoyers Date: Mon, 27 Jun 2011 16:05:27 +0000 (-0400) Subject: Merge LTTng commit c6485006a92b1b86fbb48c2b277732d3405295c9 X-Git-Tag: v1.9.1~331 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=9beb36bafc2956e34cd00512f8e327086a49fc7a;p=lttng-ust.git Merge LTTng commit c6485006a92b1b86fbb48c2b277732d3405295c9 Signed-off-by: Mathieu Desnoyers --- diff --git a/libust/ltt-events.c b/libust/ltt-events.c index a94e8f9a..42d486c1 100644 --- a/libust/ltt-events.c +++ b/libust/ltt-events.c @@ -139,6 +139,8 @@ int ltt_channel_enable(struct ltt_channel *channel) { int old; + if (channel == channel->session->metadata) + return -EPERM; old = xchg(&channel->enabled, 1); if (old) return -EEXIST; @@ -149,6 +151,8 @@ int ltt_channel_disable(struct ltt_channel *channel) { int old; + if (channel == channel->session->metadata) + return -EPERM; old = xchg(&channel->enabled, 0); if (!old) return -EEXIST; @@ -159,6 +163,8 @@ int ltt_event_enable(struct ltt_event *event) { int old; + if (event->chan == event->chan->session->metadata) + return -EPERM; old = xchg(&event->enabled, 1); if (old) return -EEXIST; @@ -169,6 +175,8 @@ int ltt_event_disable(struct ltt_event *event) { int old; + if (event->chan == event->chan->session->metadata) + return -EPERM; old = xchg(&event->enabled, 0); if (!old) return -EEXIST;