Re: [PATCH v2] perf: fix segfault in `lock contention -b`

From: Arnaldo Carvalho de Melo

Date: Fri Feb 06 2026 - 16:59:58 EST


On Thu, Feb 05, 2026 at 04:17:50PM -0800, Namhyung Kim wrote:
> On Thu, Feb 05, 2026 at 09:32:50AM -0700, Tycho Andersen wrote:
> > Check if btf loading failed, and don't do anything with it in
> > init_numa_data(). This leads to the following error message, instead of
> > just a crash:
> > libbpf: kernel BTF is missing at '/sys/kernel/btf/vmlinux', was CONFIG_DEBUG_INFO_BTF enabled?
> > libbpf: failed to find valid kernel BTF
> > libbpf: kernel BTF is missing at '/sys/kernel/btf/vmlinux', was CONFIG_DEBUG_INFO_BTF enabled?
> > libbpf: failed to find valid kernel BTF
> > libbpf: Error loading vmlinux BTF: -ESRCH
> > libbpf: failed to load BPF skeleton 'lock_contention_bpf': -ESRCH
> > Failed to load lock-contention BPF skeleton
> > lock contention BPF setup failed

> > Signed-off-by: Tycho Andersen (AMD) <tycho@xxxxxxxxxx>

> Acked-by: Namhyung Kim <namhyung@xxxxxxxxxx>

Thanks, applied to perf-tools-next,

- Arnaldo