Fix: LTTNG_KERNEL_ADD_CALLSITE: Handle unknown event type
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 18 Oct 2019 19:23:59 +0000 (15:23 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 18 Oct 2019 19:25:04 +0000 (15:25 -0400)
Return -ENOSYS for unknown event type (similarly to other commands)
rather than falling-through the switch statement.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lttng-abi.c

index 5624b6c4f99839a81f289dd45bc6a5c8e7181b2e..ad689f2873fbe6ad256021a131e2076fcb56f0db 100644 (file)
@@ -1529,6 +1529,9 @@ long lttng_event_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
                                (struct lttng_kernel_event_callsite __user *) arg);
                case LTTNG_TYPE_ENABLER:
                        return -EINVAL;
+               default:
+                       WARN_ON_ONCE(1);
+                       return -ENOSYS;
                }
        default:
                return -ENOIOCTLCMD;
This page took 0.026943 seconds and 4 git commands to generate.