aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mpi/mpi-mod.c
diff options
context:
space:
mode:
authorThomas Falcon <[email protected]>2025-11-07 17:31:50 +0000
committerArnaldo Carvalho de Melo <[email protected]>2025-11-13 20:16:33 +0000
commit85c894a80ac46aa177df04e0a33bcad409b7d64f (patch)
tree7a265271308213029559e9bd1a3760c2b018e943 /lib/mpi/mpi-mod.c
parentMerge tag 'slab-for-6.18-rc6' of git://git.kernel.org/pub/scm/linux/kernel/gi... (diff)
downloadkernel-85c894a80ac46aa177df04e0a33bcad409b7d64f.tar.gz
kernel-85c894a80ac46aa177df04e0a33bcad409b7d64f.zip
perf header: Write bpf_prog (infos|btfs)_cnt to data file
With commit f0d0f978f3f5830a ("perf header: Don't write empty BPF/BTF info"), the write_bpf_( prog_info() | btf() ) functions exit without writing anything if env->bpf_prog.(infos| btfs)_cnt is zero. process_bpf_( prog_info() | btf() ), however, still expect a "count" value to exist in the data file. If btf information is empty, for example, process_bpf_btf will read garbage or some other data as the number of btf nodes in the data file. As a result, the data file will not be processed correctly. Instead, write the count to the data file and exit if it is zero. Fixes: f0d0f978f3f5830a ("perf header: Don't write empty BPF/BTF info") Reviewed-by: Ian Rogers <[email protected]> Signed-off-by: Thomas Falcon <[email protected]> Acked-by: Namhyung Kim <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Peter Zijlstra <[email protected]> Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-mod.c')
0 files changed, 0 insertions, 0 deletions