[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250501223025.569020-1-ameryhung@gmail.com>
Date: Thu, 1 May 2025 15:30:20 -0700
From: Amery Hung <ameryhung@...il.com>
To: bpf@...r.kernel.org
Cc: netdev@...r.kernel.org,
alexei.starovoitov@...il.com,
andrii@...nel.org,
daniel@...earbox.net,
martin.lau@...nel.org,
xiyou.wangcong@...il.com,
kernel-team@...a.com
Subject: [PATCH bpf-next/net v1 0/5] Fix bpf qdisc bugs and cleanup
This patchset fixes the following bugs in bpf qdisc and cleanup 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
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: 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 | 95 ++++++++++++++++++-
.../selftests/bpf/progs/bpf_qdisc_common.h | 6 --
.../bpf/progs/bpf_qdisc_fail__incompl_ops.c | 41 ++++++++
.../selftests/bpf/progs/bpf_qdisc_fifo.c | 6 ++
.../selftests/bpf/progs/bpf_qdisc_fq.c | 6 ++
6 files changed, 164 insertions(+), 14 deletions(-)
create mode 100644 tools/testing/selftests/bpf/progs/bpf_qdisc_fail__incompl_ops.c
--
2.47.1
Powered by blists - more mailing lists