]> git.baikalelectronics.ru Git - kernel.git/commit
perf mmap: Be consistent when checking for an unmaped ring buffer
authorArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 26 Mar 2018 14:42:15 +0000 (11:42 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 27 Mar 2018 16:13:38 +0000 (13:13 -0300)
commit2b49cfd888ad3486db0ee7cebece4a85bcaf868d
tree15651e1f12cc6aff270f86f2da3a23c8ae4bc673
parentc540ea290bd43b74276548b52ccbb7c63802063f
perf mmap: Be consistent when checking for an unmaped ring buffer

The previous patch is insufficient to cure the reported 'perf trace'
segfault, as it only cures the perf_mmap__read_done() case, moving the
segfault to perf_mmap__read_init() functio, fix it by doing the same
refcount check.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Fixes: 76212cbc389e ("perf mmap: Introduce perf_mmap__read_init()")
Link: https://lkml.kernel.org/r/20180326144127.GF18897@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/mmap.c