linux/tools
Victor Nogueira e18f348632 selftests/tc-testing: Create test cases for adding qdiscs to invalid qdisc parents
As described in a previous commit [1], Lion's patch [2] revealed an ancient
bug in the qdisc API. Whenever a user tries to add a qdisc to an
invalid parent (not a class, root, or ingress qdisc), the qdisc API will
detect this after qdisc_create is called. Some qdiscs (like fq_codel, pie,
and sfq) call functions (on their init callback) which assume the parent is
valid, so qdisc_create itself may have caused a NULL pointer dereference in
such cases.

This commit creates 3 TDC tests that attempt to add fq_codel, pie and sfq
qdiscs to invalid parents

- Attempts to add an fq_codel qdisc to an hhf qdisc parent
- Attempts to add a pie qdisc to a drr qdisc parent
- Attempts to add an sfq qdisc to an inexistent hfsc classid (which would
  belong to a valid hfsc qdisc)

[1] https://lore.kernel.org/all/20250707210801.372995-1-victor@mojatatu.com/
[2] https://lore.kernel.org/netdev/d912cbd7-193b-4269-9857-525bee8bbb6a@gmail.com/

Signed-off-by: Victor Nogueira <victor@mojatatu.com>
Link: https://patch.msgid.link/20250712145035.705156-1-victor@mojatatu.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-07-14 17:18:41 -07:00
..
accounting
arch LoongArch: Replace __ASSEMBLY__ with __ASSEMBLER__ in headers 2025-06-26 20:07:10 +08:00
bootconfig tools/bootconfig: specify LDFLAGS as an argument to CC 2025-05-16 11:22:54 +09:00
bpf tools/resolve_btfids: Fix build when cross compiling kernel with clang. 2025-06-10 09:09:27 -07:00
build
certs
cgroup
counter
crypto
debugging
firewire
firmware
gpio
hv tools: hv: Enable debug logs for hv_kvp_daemon 2025-05-23 16:30:55 +00:00
iio
include uapi: bitops: use UAPI-safe variant of BITS_PER_LONG again (2) 2025-07-08 10:23:13 -04:00
kvm/kvm_stat
laptop
leds
lib libbpf: Fix possible use-after-free for externs 2025-06-25 12:28:58 -07:00
memory-model
mm
net tools: ynl: fix mixing ops and notifications on one socket 2025-06-19 08:37:39 -07:00
objtool objtool: Add missing endian conversion to read_annotate() 2025-07-01 15:02:04 +02:00
pcmcia
perf perf bench futex: Fix prctl include in musl libc 2025-06-17 18:29:42 -03:00
power cpupower: split unitdir from libdir in Makefile 2025-06-09 10:17:46 -06:00
rcu
sched_ext
scripts
sound
spi
testing selftests/tc-testing: Create test cases for adding qdiscs to invalid qdisc parents 2025-07-14 17:18:41 -07:00
thermal
time
tracing tracing tools updates for v6.16: 2025-05-29 20:59:52 -07:00
usb
verification
virtio
wmi
workqueue
writeback
Makefile