Re: [PATCH v2 2/3] bpf: do not walk twice the hash map on free

2024-04-30 Thread Benjamin Tissoires
On Apr 30 2024, Benjamin Tissoires wrote: > 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

[PATCH v2 2/3] bpf: do not walk twice the hash map on free

2024-04-30 Thread Benjamin Tissoires
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-of