diff options
author | Wang Nan <[email protected]> | 2016-01-12 10:12:04 +0000 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2016-01-12 11:24:43 -0300 |
commit | b0fb978e97f58ca930f7cafc4ddc264218710765 (patch) | |
tree | c6cd7445562342d75a2340163f1ae77e6c2fcbfc /tools/perf/scripts/python/call-graph-from-postgresql.py | |
parent | 8a59f3ccbc11fcb222b046a64929dd473f7dff54 (diff) |
perf tools: Fix mmap2 event allocation in synthesize code
perf_event__synthesize_mmap_events() issues mmap2 events, but the memory
of that event is allocated using:
mmap_event = malloc(sizeof(mmap_event->mmap) + machine->id_hdr_size);
If path of mmap source file is long (near PATH_MAX), random crash would
happen. Should use sizeof(mmap_event->mmap2).
Fix two memory allocations.
Signed-off-by: Wang Nan <[email protected]>
Reviewed-by: Masami Hiramatsu <[email protected]>
Acked-by: Jiri Olsa <[email protected]>
Cc: He Kuang <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Zefan Li <[email protected]>
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-postgresql.py')
0 files changed, 0 insertions, 0 deletions