Andrii Nakryiko fe58e3dd6e bpf: Fix map leak in HASH_OF_MAPS map
[ Upstream commit 1d4e1eab456e1ee92a94987499b211db05f900ea ]

Fix HASH_OF_MAPS bug of not putting inner map pointer on bpf_map_elem_update()
operation. This is due to per-cpu extra_elems optimization, which bypassed
free_htab_elem() logic doing proper clean ups. Make sure that inner map is put
properly in optimized case as well.

Fixes: 8c290e60fa2a ("bpf: fix hashmap extra_elems logic")
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Song Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/20200729040913.2815687-1-andriin@fb.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-08-05 09:59:48 +02:00
..
2020-08-05 09:59:48 +02:00
2019-05-28 17:46:43 -04:00
2020-01-17 19:48:42 +01:00
2020-03-25 08:25:58 +01:00
2019-05-24 20:16:01 +02:00
2020-03-25 08:25:58 +01:00
2020-01-09 10:19:54 +01:00
2020-05-20 08:20:13 +02:00
2019-07-08 19:36:47 -07:00
2019-07-08 19:36:47 -07:00