Andrii Nakryiko
768e582a99
bpf: Fix cgroup ref leak in cgroup_bpf_inherit on out-of-memory
...
commit 1d8006abaab4cb90f81add86e8d1bf9411add05a upstream.
There is no compensating cgroup_bpf_put() for each ancestor cgroup in
cgroup_bpf_inherit(). If compute_effective_progs returns error, those cgroups
won't be freed ever. Fix it by putting them in cleanup code path.
Fixes: e10360f815ca ("bpf: cgroup: prevent out-of-order release of cgroup bpf")
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Roman Gushchin <guro@fb.com>
Link: https://lore.kernel.org/bpf/20200309224017.1063297-1-andriin@fb.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-01 11:02:04 +02:00
..
arraymap.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2019-06-17 20:20:36 -07:00
bpf_lru_list.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 206
2019-05-30 11:29:53 -07:00
bpf_lru_list.h
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 206
2019-05-30 11:29:53 -07:00
btf.c
bpf: Clean up indentation issue in BTF kflag processing
2019-09-26 17:09:18 +02:00
cgroup.c
bpf: Fix cgroup ref leak in cgroup_bpf_inherit on out-of-memory
2020-04-01 11:02:04 +02:00
core.c
bpf: Fix use after free in subprog's jited symbol removal
2019-10-22 11:26:09 -07:00
cpumap.c
devmap/cpumap: Use flush list instead of bitmap
2019-06-29 01:31:08 +02:00
devmap.c
bpf, devmap: Pass lockdep expression to RCU lists
2020-02-11 04:35:29 -08:00
disasm.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 295
2019-06-05 17:36:38 +02:00
disasm.h
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 295
2019-06-05 17:36:38 +02:00
hashtab.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2019-06-17 20:20:36 -07:00
helpers.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 295
2019-06-05 17:36:38 +02:00
inode.c
bpf: map_seq_next should always increase position index
2020-02-24 08:36:58 +01: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
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2019-06-22 08:59:24 -04:00
Makefile
btf: expose BTF info through sysfs
2019-08-13 16:14:15 +02:00
map_in_map.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 206
2019-05-30 11:29:53 -07:00
map_in_map.h
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 206
2019-05-30 11:29:53 -07: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: move memory size checks to bpf_map_charge_init()
2019-05-31 16:52:56 -07: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/stackmap: Fix deadlock with rq_lock in bpf_get_stack()
2019-12-31 16:44:09 +01:00
syscall.c
bpf: Change size to u64 for bpf_map_{area_alloc, charge_init}()
2019-10-31 21:41:33 +01:00
sysfs_btf.c
btf: fix return value check in btf_vmlinux_init()
2019-08-15 22:18:17 -07:00
tnum.c
bpf: Fix incorrect verifier simulation of ARSH under ALU32
2020-01-23 08:22:44 +01:00
verifier.c
bpf: Fix incorrect verifier simulation of ARSH under ALU32
2020-01-23 08:22:44 +01:00
xskmap.c
bpf/xskmap: Return ERR_PTR for failure case instead of NULL.
2019-09-25 22:14:16 +02:00