[PATCH] perf/core: Fix mmap failure caused by bad size check