From: Nelson Elhage Date: Mon, 19 Dec 2011 13:39:30 +0000 (-0500) Subject: perf evlist: Fix errno value reporting on failed mmap X-Git-Tag: v3.3-rc1~192^2~25^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=301b195db179241da8be25f345f3c4e64960f1d5;p=pandora-kernel.git 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: Namhyung Kim Cc: Ingo Molnar Cc: Paul Mackerras Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1324301972-22740-2-git-send-email-nelhage@nelhage.com Signed-off-by: Nelson Elhage Signed-off-by: Arnaldo Carvalho de Melo --- Reading git-diff-tree failed