]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
libperf: Remove BUG_ON() from library code in get_group_fd()
authorArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 9 Jul 2021 17:52:16 +0000 (14:52 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 9 Jul 2021 18:33:39 +0000 (15:33 -0300)
commite2c18168c373c92de476b5592807169941a153f5
tree8317a0670f8b5bbb5fd8b7d96dcbc7e6b2dba783
parent3fd35de1686bf809431c5f0137de8eee5a2811d6
libperf: Remove BUG_ON() from library code in get_group_fd()

We shouldn't just panic, return a value that doesn't clash with what
perf_evsel__open() was already returning in case of error, i.e. errno
when sys_perf_event_open() fails.

Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Shunsuke Nakamura <nakamura.shun@fujitsu.com>
Link: http://lore.kernel.org/lkml/YOiOA5zOtVH9IBbE@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/lib/perf/evsel.c