diff options
-rw-r--r-- | kernel/perf_event.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/perf_event.c b/kernel/perf_event.c index d891ec4a8100..8823b0885183 100644 --- a/kernel/perf_event.c +++ b/kernel/perf_event.c | |||
@@ -1603,7 +1603,7 @@ static struct perf_event_context *find_get_context(pid_t pid, int cpu) | |||
1603 | if (perf_paranoid_cpu() && !capable(CAP_SYS_ADMIN)) | 1603 | if (perf_paranoid_cpu() && !capable(CAP_SYS_ADMIN)) |
1604 | return ERR_PTR(-EACCES); | 1604 | return ERR_PTR(-EACCES); |
1605 | 1605 | ||
1606 | if (cpu < 0 || cpu > num_possible_cpus()) | 1606 | if (cpu < 0 || cpu >= nr_cpumask_bits) |
1607 | return ERR_PTR(-EINVAL); | 1607 | return ERR_PTR(-EINVAL); |
1608 | 1608 | ||
1609 | /* | 1609 | /* |