kernel_samsung_a53x/kernel/bpf
Anton Protopopov ba63a9f94c bpf: fix potential error return
[ Upstream commit c4441ca86afe4814039ee1b32c39d833c1a16bbc ]

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 <aspsk@isovalent.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20241210114245.836164-1-aspsk@isovalent.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-01-15 16:29:56 +01:00
..
preload
arraymap.c Revert "bpf: Check percpu map value size first" 2024-11-24 00:22:59 +01:00
bpf_inode_storage.c
bpf_iter.c
bpf_local_storage.c
bpf_lru_list.c
bpf_lru_list.h
bpf_lsm.c
bpf_struct_ops.c
bpf_struct_ops_types.h
btf.c bpf: Eliminate remaining "make W=1" warnings in kernel/bpf/btf.o 2024-11-23 23:20:08 +01:00
cgroup.c
core.c bpf: fix potential error return 2025-01-15 16:29:56 +01:00
cpumap.c bpf: report RCU QS in cpumap kthread 2024-11-19 08:45:00 +01:00
devmap.c bpf: fix OOB devmap writes when deleting elements 2024-12-17 13:24:29 +01:00
disasm.c
disasm.h
dispatcher.c
hashtab.c Revert "bpf: Check percpu map value size first" 2024-11-24 00:22:59 +01:00
helpers.c Revert "bpf: Fix bpf_strtol and bpf_strtoul helpers for 32bit" 2024-11-24 00:23:22 +01:00
inode.c Revert "fs: add file and path permissions helpers" 2024-11-19 13:30:21 +01:00
local_storage.c
lpm_trie.c bpf: Fix exact match conditions in trie_get_next_key() 2024-12-17 13:24:28 +01:00
Makefile
map_in_map.c bpf: Add map and need_defer parameters to .map_fd_put_ptr() 2024-11-18 12:13:12 +01:00
map_in_map.h bpf: Add map and need_defer parameters to .map_fd_put_ptr() 2024-11-18 12:13:12 +01:00
map_iter.c
net_namespace.c
offload.c
percpu_freelist.c
percpu_freelist.h
prog_iter.c
queue_stack_maps.c
reuseport_array.c
ringbuf.c bpf: Fix overrunning reservations in ringbuf 2024-11-19 14:19:51 +01:00
stackmap.c bpf: Fix stackmap overflow check on 32-bit arches 2024-11-19 08:44:49 +01:00
syscall.c bpf: Check validity of link->type in bpf_link_show_fdinfo() 2025-01-15 16:29:51 +01:00
sysfs_btf.c
task_iter.c file: Replace fcheck_files with files_lookup_fd_rcu 2024-11-19 12:27:27 +01:00
tnum.c
trampoline.c Revert "x86/ibt,ftrace: Search for __fentry__ location" 2024-11-24 00:23:31 +01:00
verifier.c bpf: sync_linked_regs() must preserve subreg_def 2025-01-02 17:01:17 +01:00