summaryrefslogtreecommitdiffstats
path: root/kernel/events
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@redhat.com>2014-09-08 16:31:07 +0200
committerIngo Molnar <mingo@kernel.org>2014-09-16 10:30:36 +0200
commitc88f2096136416b261bd3647cc260935f6e95805 (patch)
tree73fb420bd2e65cda6ef2c25a2e72f30e4399d262 /kernel/events
parenta08b6769d4c5e8d2a3192a45e40b3cdcca0da6a1 (diff)
downloadlinux-c88f2096136416b261bd3647cc260935f6e95805.tar.bz2
perf: Do not check PERF_EVENT_STATE_EXIT on syscall read path
Revert PERF_EVENT_STATE_EXIT check on read syscall path. It breaks standard way to read counter, which is to open the counter, wait for the monitored process to die and read the counter. Reported-by: Stephane Eranian <eranian@google.com> Signed-off-by: Jiri Olsa <jolsa@kernel.org> Acked-by: Stephane Eranian <eranian@google.com> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Stephane Eranian <eranian@google.com> Cc: David Ahern <dsahern@gmail.com> Link: http://lkml.kernel.org/r/20140908143107.GG17728@krava.brq.redhat.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/events')
-rw-r--r--kernel/events/core.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c
index f917dec6f897..733c61636f0d 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -3601,8 +3601,7 @@ perf_read_hw(struct perf_event *event, char __user *buf, size_t count)
* error state (i.e. because it was pinned but it couldn't be
* scheduled on to the CPU at some point).
*/
- if ((event->state == PERF_EVENT_STATE_ERROR) ||
- (event->state == PERF_EVENT_STATE_EXIT))
+ if (event->state == PERF_EVENT_STATE_ERROR)
return 0;
if (count < event->read_size)