From 200f7484d176c202dadb48ce84bfa5fc0f1c9558 Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Fri, 10 May 2019 14:27:21 -0700 Subject: [PATCH] sysprofd: remove consistency check We can try and just let the syscall tell us what happened. --- src/sysprofd/ipc-service-impl.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/sysprofd/ipc-service-impl.c b/src/sysprofd/ipc-service-impl.c index ccde0deb..9458db00 100644 --- a/src/sysprofd/ipc-service-impl.c +++ b/src/sysprofd/ipc-service-impl.c @@ -107,16 +107,6 @@ ipc_service_impl_handle_perf_event_open (IpcService *service, g_message ("PerfEventOpen(pid=%d, cpu=%d)", pid, cpu); - /* Consistency check for cpu/pid */ - if (pid < -1 || cpu < -1 || !(pid == -1 && cpu == -1)) - { - g_dbus_method_invocation_return_error (g_steal_pointer (&invocation), - G_DBUS_ERROR, - G_DBUS_ERROR_INVALID_ARGS, - "pid and cpu must be >= -1 and only one may be -1"); - return TRUE; - } - /* Get the group_fd if provided */ message = g_dbus_method_invocation_get_message (invocation); if ((in_fd_list = g_dbus_message_get_unix_fd_list (message)) &&