From: Lin Ming Date: Thu, 30 Jun 2011 08:09:55 +0000 (+0000) Subject: perf: Remove perf_event_attr::type check X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9985c20f9e4aee6857c08246b273a3695a52b929;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git perf: Remove perf_event_attr::type check PMU type id can be allocated dynamically, so perf_event_attr::type check when copying attribute from userspace to kernel is not valid. Signed-off-by: Lin Ming Cc: Robert Richter Signed-off-by: Peter Zijlstra Link: http://lkml.kernel.org/r/1309421396-17438-4-git-send-email-ming.m.lin@intel.com Signed-off-by: Ingo Molnar --- diff --git a/kernel/events/core.c b/kernel/events/core.c index 0567e32d71aa..b8785e26ee1c 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -5926,13 +5926,6 @@ static int perf_copy_attr(struct perf_event_attr __user *uattr, if (ret) return -EFAULT; - /* - * If the type exists, the corresponding creation will verify - * the attr->config. - */ - if (attr->type >= PERF_TYPE_MAX) - return -EINVAL; - if (attr->__reserved_1) return -EINVAL;