android_kernel_motorola_sm6375/kernel/bpf
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Anton Protopopov f960a6b5d9 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-09 13:23:36 +01:00
..
arraymap.c bpf: Check percpu map value size first 2024-11-08 16:20:44 +01:00
bpf_lru_list.c bpf: Address KCSAN report on bpf_lru_list 2023-07-27 08:37:42 +02:00
bpf_lru_list.h bpf: Address KCSAN report on bpf_lru_list 2023-07-27 08:37:42 +02:00
btf.c btf: fix resolving BTF_KIND_VAR after ARRAY, STRUCT, UNION, PTR 2023-03-17 08:32:51 +01:00
cgroup.c bpf: Don't EFAULT for getsockopt with optval=NULL 2023-05-17 11:35:44 +02:00
core.c bpf: fix potential error return 2025-01-09 13:23:36 +01:00
cpumap.c bpf: report RCU QS in cpumap kthread 2024-03-26 18:22:25 -04:00
devmap.c bpf, xdp: Update devmap comments to reflect napi/rcu usage 2024-12-14 19:44:56 +01:00
disasm.c bpf: Introduce BPF nospec instruction for mitigating Spectre v4 2021-09-15 09:47:38 +02:00
disasm.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 295 2019-06-05 17:36:38 +02:00
hashtab.c bpf: Check percpu map value size first 2024-11-08 16:20:44 +01:00
helpers.c bpf: Fix bpf_strtol and bpf_strtoul helpers for 32bit 2024-11-08 16:20:31 +01:00
inode.c bpf: Fix a rcu warning for bpffs map pretty-print 2020-10-01 13:18:19 +02:00
local_storage.c bpf: move memory size checks to bpf_map_charge_init() 2019-05-31 16:52:56 -07:00
lpm_trie.c bpf: Fix exact match conditions in trie_get_next_key() 2024-12-14 19:44:48 +01:00
Makefile bpf: Don't rely on GCC __attribute__((optimize)) to disable GCSE 2020-11-18 19:20:26 +01:00
map_in_map.c bpf: Add map and need_defer parameters to .map_fd_put_ptr() 2024-02-23 08:24:57 +01:00
map_in_map.h bpf: Add map and need_defer parameters to .map_fd_put_ptr() 2024-02-23 08:24:57 +01:00
offload.c bpf, offload: Replace bitwise AND by logical AND in bpf_prog_offload_info_fill 2020-02-28 17:22:27 +01:00
percpu_freelist.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 206 2019-05-30 11:29:53 -07:00
percpu_freelist.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 206 2019-05-30 11:29:53 -07:00
queue_stack_maps.c bpf: Avoid deadlock when using queue and stack maps from NMI 2023-10-10 21:46:36 +02:00
reuseport_array.c bpf: move memory size checks to bpf_map_charge_init() 2019-05-31 16:52:56 -07:00
stackmap.c bpf: Fix stackmap overflow check on 32-bit arches 2024-03-26 18:22:17 -04:00
syscall.c bpf: Ensure correct locking around vulnerable function find_vpid() 2022-10-26 13:22:24 +02:00
sysfs_btf.c bpf: Fix sysfs export of empty BTF section 2020-10-14 10:32:58 +02:00
tnum.c bpf: Fix incorrect verifier simulation of ARSH under ALU32 2020-01-23 08:22:44 +01:00
verifier.c bpf: use kvzmalloc to allocate BPF verifier environment 2024-11-17 14:58:53 +01:00
xskmap.c bpf/xskmap: Return ERR_PTR for failure case instead of NULL. 2019-09-25 22:14:16 +02:00