Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 301b195d authored by Nelson Elhage's avatar Nelson Elhage Committed by Arnaldo Carvalho de Melo
Browse files

perf evlist: Fix errno value reporting on failed mmap



On failure, perf_evlist__mmap_per_{cpu,thread} will try to munmap()
every map that doesn't have a NULL base. This will fail with EINVAL if
one of them has base == MAP_FAILED, clobbering errno, so that
perf_evlist__map will return EINVAL on any failure regardless of the
root cause.

Fix this by resetting failed maps to a NULL base.

Acked-by: default avatarNamhyung Kim <namhyung@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1324301972-22740-2-git-send-email-nelhage@nelhage.com


Signed-off-by: default avatarNelson Elhage <nelhage@nelhage.com>
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 6581f6e3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment