diff options
author | Andi Kleen <ak@linux.intel.com> | 2019-10-20 10:51:54 -0700 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-11-06 15:43:05 -0300 |
commit | 796c01a4bfb4b35ec6d1bd1cd5d520515d078b51 (patch) | |
tree | 57081bb36da7d51bac16f9e8287db0535b6d26b9 /tools/perf/scripts/python/mem-phys-addr.py | |
parent | 9d604aad4bb022e848dec80d6fe5f73fe87061a2 (diff) |
perf evsel: Always preserve errno while cleaning up perf_event_open failures
In some cases when perf_event_open fails, it may do some closes to clean
up. In special cases these closes can fail too, which overwrites the
errno of the perf_event_open, which is then incorrectly reported.
Save/restore errno around closes.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lore.kernel.org/lkml/20191020175202.32456-2-andi@firstfloor.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/mem-phys-addr.py')
0 files changed, 0 insertions, 0 deletions