aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stat-cpi.py
diff options
context:
space:
mode:
authorJiri Olsa <[email protected]>2021-01-11 20:16:50 +0100
committerDaniel Borkmann <[email protected]>2021-01-12 00:17:34 +0100
commit5541075a348b6ca6ac668653f7d2c423ae8e00b6 (patch)
tree42706ccb77a9bb603822a9ff9168c4199c38674d /tools/perf/scripts/python/stat-cpi.py
parentf97844f9c518172f813b7ece18a9956b1f70c1bb (diff)
bpf: Prevent double bpf_prog_put call from bpf_tracing_prog_attach
The bpf_tracing_prog_attach error path calls bpf_prog_put on prog, which causes refcount underflow when it's called from link_create function. link_create prog = bpf_prog_get <-- get ... tracing_bpf_link_attach(prog.. bpf_tracing_prog_attach(prog.. out_put_prog: bpf_prog_put(prog); <-- put if (ret < 0) bpf_prog_put(prog); <-- put Removing bpf_prog_put call from bpf_tracing_prog_attach and making sure its callers call it instead. Fixes: 4a1e7c0c63e0 ("bpf: Support attaching freplace programs to multiple attach points") Signed-off-by: Jiri Olsa <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Acked-by: Toke Høiland-Jørgensen <[email protected]> Acked-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/stat-cpi.py')
0 files changed, 0 insertions, 0 deletions