summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2026-06-11 02:16:02 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2026-06-17 14:28:40 +0300
commitd2c6069d68ee9d53b05fe38bc2049cc4286fbb16 (patch)
treefc5aaffc48b4155d9f6af8bc642f423bc6f1c63b /scripts
parentf973e52a99776fcc473488984828d1fce56d5382 (diff)
downloadlinux-d2c6069d68ee9d53b05fe38bc2049cc4286fbb16.tar.xz
perf dso: Set error code when open() fails on uncompressed fallback path
filename__decompress() has an early return for files that are not actually compressed, where it calls open() directly. When open() fails, the function returns -1 but never sets *err. The caller chain (decompress_kmodule → dso__decompress_kmodule_path → dso__get_filename) then reads *dso__load_errno(dso) to set errno, but that field was never populated, so errno gets a stale or zero value. With errno=0, __open_dso() computes fd = -errno = 0, which is non- negative, so callers treat fd 0 (stdin) as a valid DSO file descriptor. Set *err = errno when open() fails on the uncompressed path, matching the error handling on the compressed path at line 354. Reported-by: sashiko-bot <sashiko-bot@kernel.org> Fixes: 8b42b7e5e8b5692b ("perf tools: Add is_compressed callback to compressions array") Cc: Jiri Olsa <jolsa@kernel.org> Assisted-by: Claude:claude-opus-4.6 Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions