From 9beb36bafc2956e34cd00512f8e327086a49fc7a Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Mon, 27 Jun 2011 12:05:27 -0400 Subject: [PATCH] Merge LTTng commit c6485006a92b1b86fbb48c2b277732d3405295c9 Signed-off-by: Mathieu Desnoyers --- libust/ltt-events.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libust/ltt-events.c b/libust/ltt-events.c index a94e8f9..42d486c 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; -- 2.34.1