Fix: syscall tracing: disable all and missing error handling
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 24 Sep 2014 01:04:29 +0000 (21:04 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Thu, 25 Sep 2014 15:36:07 +0000 (11:36 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
src/bin/lttng-sessiond/cmd.c

index bbc122152204bf4308a15f9afbe6a58dd4b587b3..0050ef50b1169c9b3b16545aee2c8e48e950ccfc 100644 (file)
@@ -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:
                        /*
This page took 0.028164 seconds and 4 git commands to generate.