summaryrefslogtreecommitdiff
path: root/scripts/patch-kernel
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2026-08-02 11:27:10 -0300
committerNamhyung Kim <namhyung@kernel.org>2026-08-05 11:20:02 -0700
commit60f2f5b7650bb8779af3087ef429fad4ed74a5c8 (patch)
treeac3df4cde0fba1cefd9ed0afecc75f4c54230ed9 /scripts/patch-kernel
parent01765b456f850aed7475b37111f1c50bf76aaf51 (diff)
downloadlinux-60f2f5b7650bb8779af3087ef429fad4ed74a5c8.tar.gz
linux-60f2f5b7650bb8779af3087ef429fad4ed74a5c8.zip
perf header: Use write lock when translating BPF prog info pointers
write_bpf_prog_info() holds a read lock while temporarily mutating info_linear via bpil_addr_to_offs()/bpil_offs_to_addr(). Between these two calls, the pointers in info_linear contain file offsets instead of heap addresses. Concurrent readers holding the same read lock see the file offsets and dereference them as pointers. Use down_write()/up_write() instead of down_read()/up_read() to exclude concurrent readers during the addr-to-offset-to-addr translation window. Fixes: 63ac7968a1fb ("perf bpf: Save bpf_prog_info information as headers to perf.data") Reported-by: sashiko-bot <sashiko-bot@kernel.org> Cc: Song Liu <songliubraving@fb.com> Reviewed-by: Ian Rogers <irogers@google.com> Assisted-by: Claude:claude-opus-4.6 Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'scripts/patch-kernel')
0 files changed, 0 insertions, 0 deletions