]> git.baikalelectronics.ru Git - kernel.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)
commitabb1849e77c334313c2516ccfc4bf7b8013a9a92
tree8317a0670f8b5bbb5fd8b7d96dcbc7e6b2dba783
parentcc4fd2c20eacf6a816b9fbbb8ca64fde18c7cf75
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