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.12.0-pre~17 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=64c147c07f1361707e182762866524c1c14bb9ad;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 d9e85dc2..5c6f384d 100644 --- a/lttng-abi.c +++ b/lttng-abi.c @@ -1567,6 +1567,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;