From: Mathieu Desnoyers Date: Fri, 18 Oct 2019 19:23:59 +0000 (-0400) Subject: Fix: LTTNG_KERNEL_ADD_CALLSITE: Handle unknown event type X-Git-Tag: v2.11.1~11 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=77cd7f175c3ab35ebd6fdfc0bcd93ff7a97a612c;p=lttng-modules.git Fix: LTTNG_KERNEL_ADD_CALLSITE: Handle unknown event type Return -ENOSYS for unknown event type (similarly to other commands) rather than falling-through the switch statement. Signed-off-by: Mathieu Desnoyers --- diff --git a/lttng-abi.c b/lttng-abi.c index 5624b6c4..ad689f28 100644 --- a/lttng-abi.c +++ b/lttng-abi.c @@ -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;