Re: [PATCH 2/3] perf core: Fix a mmap & munmap mismatches bug in dso__load

From: Namhyung Kim
Date: Tue Sep 03 2013 - 05:02:30 EST


On Sun, 1 Sep 2013 23:29:44 +0800, Chenggang Qin wrote:
> From: Chenggang Qin <chenggang.qcg@xxxxxxxxxx>
>
> Some dsos' symsrc is neither syms_ss or runtime_ss. In this situation, the
> corresponding ELF file is opened and mmapped in symsrc__init(), but they will
> be not closed and munmapped in any place.
> This bug can lead to mmap & munmap mismatched, the mmap areas will exist during
> the life of perf. We can think this is a memory leak.
> This patch fixed the bug. symsrc__destroy() is called while the opened and
> mmaped ELF file has neither symtlb section nor dynsym section, and opdsec
> section.
> Thanks.

Acked-by: Namhyung Kim <namhyung@xxxxxxxxxx>

Thanks,
Namhyung
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/