From: Mathieu Desnoyers Date: Wed, 24 Sep 2014 01:04:29 +0000 (-0400) Subject: Fix: syscall tracing: disable all and missing error handling X-Git-Tag: v2.6.0-rc1~37 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=e2b957af5bd8b18bc08e5ab34a9c1e54bfd98275;p=lttng-tools.git Fix: syscall tracing: disable all and missing error handling Signed-off-by: Mathieu Desnoyers --- diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c index bbc122152..0050ef50b 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -1070,6 +1070,9 @@ int cmd_disable_event(struct ltt_session *session, int domain, break; case LTTNG_EVENT_SYSCALL: ret = event_kernel_disable_syscall(kchan, event_name); + if (ret != LTTNG_OK) { + goto error; + } break; default: ret = LTTNG_ERR_UNK; @@ -1178,9 +1181,6 @@ int disable_kevent_all(struct ltt_session *session, int domain, struct lttng_event *event) { int ret; - char *event_name; - - event_name = event->name; rcu_read_lock(); @@ -1216,7 +1216,10 @@ int disable_kevent_all(struct ltt_session *session, int domain, } break; case LTTNG_EVENT_SYSCALL: - ret = event_kernel_disable_syscall(kchan, event_name); + ret = event_kernel_disable_syscall(kchan, ""); + if (ret != LTTNG_OK) { + goto error; + } break; default: ret = LTTNG_ERR_UNK; @@ -1457,6 +1460,9 @@ int cmd_enable_event(struct ltt_session *session, struct lttng_domain *domain, break; case LTTNG_EVENT_SYSCALL: ret = event_kernel_enable_syscall(kchan, event->name); + if (ret != LTTNG_OK) { + goto error; + } break; default: ret = LTTNG_ERR_UNK; @@ -1663,6 +1669,9 @@ int enable_kevent_all(struct ltt_session *session, switch (event->type) { case LTTNG_EVENT_SYSCALL: ret = event_kernel_enable_syscall(kchan, ""); + if (ret != LTTNG_OK) { + goto error; + } break; case LTTNG_EVENT_TRACEPOINT: /*