From 64c147c07f1361707e182762866524c1c14bb9ad 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 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; -- 2.34.1