summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/scripting-engines
diff options
context:
space:
mode:
authorChenggang Qin2013-10-11 02:27:57 +0200
committerArnaldo Carvalho de Melo2013-10-14 17:21:23 +0200
commit784f3390f9bd900adfb3b0373615e105a0d9749a (patch)
treeda35f0ffc970ef9b1348ae9179c5cde2843d68f9 /tools/perf/util/scripting-engines
parentperf symbols: Fix a memory leak due to symbol__delete not being used (diff)
downloadkernel-qcow2-linux-784f3390f9bd900adfb3b0373615e105a0d9749a.tar.gz
kernel-qcow2-linux-784f3390f9bd900adfb3b0373615e105a0d9749a.tar.xz
kernel-qcow2-linux-784f3390f9bd900adfb3b0373615e105a0d9749a.zip
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 <namhyung@kernel.org> Signed-off-by: Chenggang Qin <chenggang.qcg@taobao.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Arjan van de Ven <arjan@linux.intel.com> Cc: Chenggang Qin <chenggang.qcg@taobao.com> Cc: David Ahern <dsahern@gmail.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Wu Fengguang <fengguang.wu@intel.com> Cc: Yanmin Zhang <yanmin.zhang@intel.com> Link: http://lkml.kernel.org/r/1381451279-4109-1-git-send-email-chenggang.qin@gmail.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/scripting-engines')
0 files changed, 0 insertions, 0 deletions