From 77cd7f175c3ab35ebd6fdfc0bcd93ff7a97a612c Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Fri, 18 Oct 2019 15:23:59 -0400 Subject: [PATCH] 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 --- lttng-abi.c | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.34.1