perf sched: Do not delete session object prematurely
commit4c09bafae37d870ab8efc50faeeb4855cb55b5b7
authorJiri Olsa <jolsa@redhat.com>
Mon, 8 Aug 2011 21:03:34 +0000 (8 23:03 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 9 Aug 2011 16:31:38 +0000 (9 13:31 -0300)
tree9e750321369285dec47289fe4af8acd221140c0d
parent069e3725dd9be3b759a98e8c80ac5fc38b392b23
perf sched: Do not delete session object prematurely

The session object is released prematurely when processing events for
latency command. The session's thread objects are used within the
output_lat_thread function.

Runnning following commands:

 # perf sched record
 # perf sched latency

the latter displays incorrect data and might cause access violation.

Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1312837414-3819-1-git-send-email-jolsa@redhat.com
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-sched.c