X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=lttng-events.c;h=135c8c527123acd43266c7191148d9bc314121a8;hb=af991434d1e5fd073968feae6befdb240942def5;hp=b2d0d754907d863903566921d0ac3521619978df;hpb=a36580d58f21f305c1f2465acba726c1e9b82ae8;p=lttng-modules.git diff --git a/lttng-events.c b/lttng-events.c index b2d0d754..135c8c52 100644 --- a/lttng-events.c +++ b/lttng-events.c @@ -379,8 +379,14 @@ struct lttng_event *lttng_event_create(struct lttng_channel *chan, */ list_for_each_entry(event, &chan->session->events, list) { if (!strcmp(event->desc->name, event_param->name)) { - ret = -EEXIST; - goto exist; + /* + * Allow events with the same name to appear in + * different channels. + */ + if (event->chan == chan) { + ret = -EEXIST; + goto exist; + } } } event = kmem_cache_zalloc(event_cache, GFP_KERNEL);