Skip to content

Fix bpf qdisc bugs and clean up

Amery Hung bpf netdev 2 versions – Applied

Status from this message: Applied. Thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 1 replyApplied 3/5
  2. v15 patches 8 repliesSuperseded

Patches in v2 Applied · 3/5

#Subject and filesSizeRepliesApplied
1/5bpf: net_sched: Fix bpf qdisc init prologue when set as default qdiscnet/sched/bpf_qdisc.c+7 -50 repliesApplied
2/5selftests/bpf: Test setting and creating bpf qdisc as default qdisctools/testing/selftests/bpf/prog_tests/bpf_qdisc.c tools/testing/selftests/bpf/progs/bpf_qdisc_fifo.c+64 -00 replies
3/5bpf: net_sched: Make some Qdisc_ops ops mandatorynet/sched/bpf_qdisc.c+12 -00 repliesApplied
4/5selftests/bpf: Test attaching a bpf qdisc with incomplete operatorstools/testing/selftests/bpf/prog_tests/bpf_qdisc.c tools/testing/selftests/bpf/progs/bpf_qdisc_fail__incompl_ops.c tools/testing/selftests/bpf/progs/bpf_qdisc_fifo.c +1 more+72 -01 reply
5/5selftests/bpf: Cleanup bpf qdisc selfteststools/testing/selftests/bpf/prog_tests/bpf_qdisc.c tools/testing/selftests/bpf/progs/bpf_qdisc_common.h+11 -450 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH bpf-next/net v2 0/5] Fix bpf qdisc bugs and clean up

This patchset fixes the following bugs in bpf qdisc and clean up the selftest.

- A null-pointer dereference can happen in qdisc_watchdog_cancel() if the timer is not initialized when 1) .init is not defined by user so init prologue is not generated. 2) .init fails and qdisc_create() calls .destroy

- bpf qdisc fails to attach to mq/mqprio when being set as the default qdisc due to failed qdisc_lookup() in init prologue

v2
- Rebase to bpf-next/net
- Fix erroneous commit messages
- Fix and simplify selftests cleanup
v1: https://lore.kernel.org/bpf/[email protected]/

Amery Hung (5):
bpf: net_sched: Fix bpf qdisc init prologue when set as default qdisc selftests/bpf: Test setting and creating bpf qdisc as default qdisc
bpf: net_sched: Make some Qdisc_ops ops mandatory selftests/bpf: Test attaching a bpf qdisc with incomplete operators selftests/bpf: Cleanup bpf qdisc selftests

 net/sched/bpf_qdisc.c                         |  24 +++-
 .../selftests/bpf/prog_tests/bpf_qdisc.c      | 120 +++++++++++++-----
 .../selftests/bpf/progs/bpf_qdisc_common.h    |   6 -
 .../bpf/progs/bpf_qdisc_fail__incompl_ops.c   |  41 ++++++
 .../selftests/bpf/progs/bpf_qdisc_fifo.c      |   9 ++
 .../selftests/bpf/progs/bpf_qdisc_fq.c        |   6 +
 6 files changed, 161 insertions(+), 45 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/progs/bpf_qdisc_fail__incompl_ops.c
Signature · 1 line
2.47.1