diff options
author | Wang Nan <wangnan0@huawei.com> | 2016-02-26 12:32:17 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-03-03 17:10:36 +0300 |
commit | 95c365617aa37878592f2f1c6c64e1abb19f0d4a (patch) | |
tree | 6217b75ff3a02ef9e4f0ca1020efb096ec331e24 /certs | |
parent | e1ab48ba63ee6b2494a67bb60bf99692ecdaca7c (diff) | |
download | linux-95c365617aa37878592f2f1c6c64e1abb19f0d4a.tar.xz |
perf record: Ensure return non-zero rc when mmap fail
perf_evlist__mmap_ex() can fail without setting errno (for example, fail
in condition checking. In this case all syscall is success).
If this happen, record__open() incorrectly returns 0. Force setting rc
is a quick way to avoid this problem, or we have to follow all possible
code path in perf_evlist__mmap_ex() to make sure there's at least one
system call before returning an error.
Signed-off-by: Wang Nan <wangnan0@huawei.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: He Kuang <hekuang@huawei.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Li Zefan <lizefan@huawei.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Zefan Li <lizefan@huawei.com>
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/r/1456479154-136027-30-git-send-email-wangnan0@huawei.com
Signed-off-by: He Kuang <hekuang@huawei.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'certs')
0 files changed, 0 insertions, 0 deletions