aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLin Ming <ming.m.lin@intel.com>2011-06-30 04:09:55 -0400
committerIngo Molnar <mingo@elte.hu>2011-07-21 14:41:55 -0400
commit9985c20f9e4aee6857c08246b273a3695a52b929 (patch)
treee2942d148c4cbd51ddcaa8c9b8e47229a31f6e34 /kernel
parentf53173e47dee5f7514d264796bec58d43ed0f67f (diff)
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 <ming.m.lin@intel.com> Cc: Robert Richter <robert.richter@amd.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1309421396-17438-4-git-send-email-ming.m.lin@intel.com Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/events/core.c7
1 files changed, 0 insertions, 7 deletions
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,
5926 if (ret) 5926 if (ret)
5927 return -EFAULT; 5927 return -EFAULT;
5928 5928
5929 /*
5930 * If the type exists, the corresponding creation will verify
5931 * the attr->config.
5932 */
5933 if (attr->type >= PERF_TYPE_MAX)
5934 return -EINVAL;
5935
5936 if (attr->__reserved_1) 5929 if (attr->__reserved_1)
5937 return -EINVAL; 5930 return -EINVAL;
5938 5931