mbox series

[bpf-next,v3,0/3] bpf_wq followup series

Message ID 20240430-bpf-next-v3-0-27afe7f3b17c@kernel.org
Headers show
Series bpf_wq followup series | expand

Message

Benjamin Tissoires April 30, 2024, 10:43 a.m. UTC
Few patches that should have been there from day 1.

Anyway, they are coming now.

Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
---
Changes in v3:
- fixed bpf_test module not being able to be removed, because the bpf_wq
  was never freed
- Link to v2: https://lore.kernel.org/r/20240430-bpf-next-v2-0-140aa50f0f19@kernel.org

Changes in v2:
- fix wq in hashtabs not being freed (and static call not being used)
- Link to v1: https://lore.kernel.org/r/20240425-bpf-next-v1-0-1d8330e6c643@kernel.org

---
Benjamin Tissoires (3):
      bpf: do not walk twice the map on free
      bpf: do not walk twice the hash map on free
      selftests/bpf: drop an unused local variable

 kernel/bpf/arraymap.c                       | 15 ++++-----
 kernel/bpf/hashtab.c                        | 49 ++++++++---------------------
 tools/testing/selftests/bpf/prog_tests/wq.c |  2 --
 3 files changed, 21 insertions(+), 45 deletions(-)
---
base-commit: 1bba3b3d373dbafae891e7cb06b8c82c8d62aba1
change-id: 20240425-bpf-next-2114350587e3

Best regards,

Comments

Kumar Kartikeya Dwivedi April 30, 2024, 12:37 p.m. UTC | #1
On Tue, 30 Apr 2024 at 12:43, Benjamin Tissoires <bentiss@kernel.org> wrote:
>
> If someone stores both a timer and a workqueue in a map, on free we
> would walk it twice.
> Add a check in array_map_free_timers_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>
>
> ---
>
> no changes in v3
>
> no changes in v2
> ---

Acked-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>

>  [...]