lkml.org 
[lkml]   [2013]   [Jun]   [3]   [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 Fri, May 31, 2013 at 10:47:36AM +0200, Robert Richter wrote:
> From: Robert Richter <robert.richter@calxeda.com>

SNIP

> out:
> mutex_unlock(&per_cpu(pers_events_lock, cpu));
> }
> @@ -182,18 +195,31 @@ fail:
> 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));

maybe check for valid cpu, since perf_get_persistent_event_fd is
called directly from syscall allowing anything in cpu

(unrelated to this patch, but I couldn't find the original
patch that adds perf_get_persistent_event_fd)

jirka


\
 
 \ /
  Last update: 2013-06-03 16:43    [W:0.230 / U:2.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site