aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/git-resolve.sh
diff options
context:
space:
mode:
authorAndrii Nakryiko <[email protected]>2025-06-06 20:21:34 +0000
committerAlexei Starovoitov <[email protected]>2025-06-06 21:07:07 +0000
commit02670deede2288d8e4e3d800477b27c091080fae (patch)
tree59c6a1f82c552ebdb3d450a17f679520ec376dc4 /scripts/git-resolve.sh
parentMerge tag 'spi-v6.16-merge-window' of git://git.kernel.org/pub/scm/linux/kern... (diff)
downloadkernel-02670deede2288d8e4e3d800477b27c091080fae.tar.gz
kernel-02670deede2288d8e4e3d800477b27c091080fae.zip
libbpf: Handle unsupported mmap-based /sys/kernel/btf/vmlinux correctly
libbpf_err_ptr() helpers are meant to return NULL and set errno, if there is an error. But btf_parse_raw_mmap() is meant to be used internally and is expected to return ERR_PTR() values. Because of this mismatch, when libbpf tries to mmap /sys/kernel/btf/vmlinux, we don't detect the error correctly with IS_ERR() check, and never fallback to old non-mmap-based way of loading vmlinux BTF. Fix this by using proper ERR_PTR() returns internally. Reported-by: Arnaldo Carvalho de Melo <[email protected]> Reviewed-by: Arnaldo Carvalho de Melo <[email protected]> Tested-by: Arnaldo Carvalho de Melo <[email protected]> Fixes: 3c0421c93ce4 ("libbpf: Use mmap to parse vmlinux BTF from sysfs") Cc: Lorenz Bauer <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'scripts/git-resolve.sh')
0 files changed, 0 insertions, 0 deletions