summaryrefslogtreecommitdiffstats
path: root/tools/perf/pmu-events
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2019-10-25 11:08:22 -0700
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-11-06 15:49:39 -0300
commit8e8714c3d157568b7a769917a5e05573bbaf5af0 (patch)
tree9cd0d62fc77f48dfc92aa3c638b9e078a2e5ea9e /tools/perf/pmu-events
parent22bd8f1b5a1dd168ba4eba27cb17643a11012f5d (diff)
downloadlinux-stable-8e8714c3d157568b7a769917a5e05573bbaf5af0.tar.gz
linux-stable-8e8714c3d157568b7a769917a5e05573bbaf5af0.tar.bz2
linux-stable-8e8714c3d157568b7a769917a5e05573bbaf5af0.zip
perf tools: Splice events onto evlist even on error
If event parsing fails the event list is leaked, instead splice the list onto the out result and let the caller cleanup. An example input for parse_events found by libFuzzer that reproduces this memory leak is 'm{'. Signed-off-by: Ian Rogers <irogers@google.com> Acked-by: Jiri Olsa <jolsa@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Andi Kleen <ak@linux.intel.com> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Jin Yao <yao.jin@linux.intel.com> Cc: John Garry <john.garry@huawei.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Martin KaFai Lau <kafai@fb.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Song Liu <songliubraving@fb.com> Cc: Stephane Eranian <eranian@google.com> Cc: Yonghong Song <yhs@fb.com> Cc: bpf@vger.kernel.org Cc: clang-built-linux@googlegroups.com Cc: netdev@vger.kernel.org Link: http://lore.kernel.org/lkml/20191025180827.191916-5-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/pmu-events')
0 files changed, 0 insertions, 0 deletions