lkml.org 
[lkml]   [2013]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 16/16] perf, persistent: Allow multiple users for an event
On Tue, Jun 04, 2013 at 11:19:21AM +0200, Jiri Olsa wrote:
> hum, can't see it:
>
> perf SYSCALL:
> ...
> return perf_get_persistent_event_fd(cpu, &attr);
>
> ...
> int perf_get_persistent_event_fd(unsigned cpu, struct perf_event_attr *attr)
> {
> struct pers_event_desc *desc;
> struct perf_event *event;
> int event_fd = -ENODEV;
>
> mutex_lock(&per_cpu(pers_events_lock, cpu));
> ...
>
> 'cpu' did not pass ay check here..

Oh, I see.

You mean something like

if (cpu < NR_CPUS && cpu_online(cpu))

?

I guess that should cover your concerns...

--
Regards/Gruss,
Boris.

Sent from a fat crate under my desk. Formatting is fine.
--


\
 
 \ /
  Last update: 2013-06-04 17:42    [W:0.061 / U:0.796 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site