aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/prog_tests/changes_pkt_data.c
diff options
context:
space:
mode:
authorAnton Protopopov <[email protected]>2024-12-10 11:42:45 +0000
committerAlexei Starovoitov <[email protected]>2024-12-10 19:17:53 +0000
commitc4441ca86afe4814039ee1b32c39d833c1a16bbc (patch)
tree3112465a5fa03bfe57455d23b72a67771819dc28 /tools/testing/selftests/bpf/prog_tests/changes_pkt_data.c
parentMerge branch 'bpf-track-changes_pkt_data-property-for-global-functions' (diff)
downloadkernel-c4441ca86afe4814039ee1b32c39d833c1a16bbc.tar.gz
kernel-c4441ca86afe4814039ee1b32c39d833c1a16bbc.zip
bpf: fix potential error return
The bpf_remove_insns() function returns WARN_ON_ONCE(error), where error is a result of bpf_adj_branches(), and thus should be always 0 However, if for any reason it is not 0, then it will be converted to boolean by WARN_ON_ONCE and returned to user space as 1, not an actual error value. Fix this by returning the original err after the WARN check. Signed-off-by: Anton Protopopov <[email protected]> Acked-by: Jiri Olsa <[email protected]> Acked-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/changes_pkt_data.c')
0 files changed, 0 insertions, 0 deletions