diff options
author | Chenggang Qin <[email protected]> | 2013-10-11 08:27:57 +0800 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2013-10-14 12:21:23 -0300 |
commit | 784f3390f9bd900adfb3b0373615e105a0d9749a (patch) | |
tree | da35f0ffc970ef9b1348ae9179c5cde2843d68f9 /tools/perf/util/scripting-engines/trace-event-python.c | |
parent | d4f74eb89199dc7bde5579783e9188841e1271e3 (diff) |
perf symbols: Fix a mmap and munmap mismatched bug
In function filename__read_debuglink(), while the ELF file is opend and
mmapped in elf_begin(), but if this file is considered to not be usable
during the following code, we will goto the close(fd) directly. The
elf_end() is skipped. So, the mmaped ELF file cannot be munmapped. The
mmapped areas exist during the life of perf.
This is a memory leak. This patch fixed this bug.
Reviewed-by: Namhyung Kim <[email protected]>
Signed-off-by: Chenggang Qin <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Arjan van de Ven <[email protected]>
Cc: Chenggang Qin <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Wu Fengguang <[email protected]>
Cc: Yanmin Zhang <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions