diff options
author | Benjamin Tissoires <bentiss@kernel.org> | 2024-04-30 12:43:25 +0200 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2024-04-30 16:28:46 +0200 |
commit | a891711d0166133ec5120615fcf365d9745d82b2 (patch) | |
tree | 7011e016746a27dcc06228506e6d2d6ab806ff9b /tools/testing/selftests/bpf/prog_tests/access_variable_array.c | |
parent | b98a5c68ccaa94e93b9e898091fe2cf21c1500e6 (diff) |
bpf: Do not walk twice the hash map on free
If someone stores both a timer and a workqueue in a hash map, on free, we
would walk it twice.
Add a check in htab_free_malloced_timers_or_wq and free the timers and
workqueues if they are present.
Fixes: 246331e3f1ea ("bpf: allow struct bpf_wq to be embedded in arraymaps and hashmaps")
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/bpf/20240430-bpf-next-v3-2-27afe7f3b17c@kernel.org
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/access_variable_array.c')
0 files changed, 0 insertions, 0 deletions