Re: [PATCH 1/3] perf core: Fix a mmap and munmap mismatched bug

From: Namhyung Kim
Date: Tue Sep 03 2013 - 05:01:37 EST


Hi Chenggang,

On Sun, 1 Sep 2013 23:29:43 +0800, Chenggang Qin wrote:
> From: root <root@xxxxxxxxxxxxxxxxxx>
>
> 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 memory areas are mmapped is
> exist during the life of perf. This is a memory leak.
> This patch fixed this bug.
> Thanks.

Reviewed-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/