Skip to content

Commit

Permalink
perf: Remove perf_event_attr::type check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lin Ming authored and Ingo Molnar committed Jul 21, 2011
1 parent f53173e commit 9985c20
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions kernel/events/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 9985c20

Please sign in to comment.