kernel_samsung_a53x/kernel/bpf
Hou Tao 975042815a bpf: Set uattr->batch.count as zero before batched update or deletion
[ Upstream commit 06e5c999f10269a532304e89a6adb2fbfeb0593c ]

generic_map_{delete,update}_batch() doesn't set uattr->batch.count as
zero before it tries to allocate memory for key. If the memory
allocation fails, the value of uattr->batch.count will be incorrect.

Fix it by setting uattr->batch.count as zero beore batched update or
deletion.

Signed-off-by: Hou Tao <houtao1@huawei.com>
Link: https://lore.kernel.org/r/20231208102355.2628918-6-houtao@huaweicloud.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-18 12:13:12 +01:00
..
preload Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
arraymap.c bpf: Add map and need_defer parameters to .map_fd_put_ptr() 2024-11-18 12:13:12 +01:00
bpf_inode_storage.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bpf_iter.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bpf_local_storage.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bpf_lru_list.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bpf_lru_list.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bpf_lsm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bpf_struct_ops.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bpf_struct_ops_types.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
btf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cgroup.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
core.c bpf: Detect IP == ksym.end as part of BPF program 2024-11-18 11:43:12 +01:00
cpumap.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
devmap.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
disasm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
disasm.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dispatcher.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hashtab.c bpf: Add map and need_defer parameters to .map_fd_put_ptr() 2024-11-18 12:13:12 +01:00
helpers.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
inode.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
local_storage.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lpm_trie.c bpf, lpm: Fix check prefixlen before walking trie 2024-11-18 12:12:28 +01:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
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 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
net_namespace.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
offload.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
percpu_freelist.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
percpu_freelist.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
prog_iter.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
queue_stack_maps.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
reuseport_array.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ringbuf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stackmap.c bpf: Add crosstask check to __bpf_get_stack 2024-11-18 12:12:28 +01:00
syscall.c bpf: Set uattr->batch.count as zero before batched update or deletion 2024-11-18 12:13:12 +01:00
sysfs_btf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
task_iter.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tnum.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trampoline.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
verifier.c bpf: Fix verification of indirect var-off stack access 2024-11-18 12:12:36 +01:00