]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net/sched: netem: fix queue limit check to include reordered packets
authorStephen Hemminger <stephen@networkplumber.org>
Sat, 18 Apr 2026 03:19:40 +0000 (20:19 -0700)
committerJakub Kicinski <kuba@kernel.org>
Tue, 28 Apr 2026 00:30:27 +0000 (17:30 -0700)
commit4185701fcce6b426b6c3630b25330dddd9c47b0d
tree39f603785690bd02194e5eb3bdafa18d8e5a15de
parent732b463449fd0ef90acd13cda68eab1c91adb00c
net/sched: netem: fix queue limit check to include reordered packets

The queue limit check in netem_enqueue() uses q->t_len which only
counts packets in the internal tfifo. Packets placed in sch->q by
the reorder path (__qdisc_enqueue_head) are not counted, allowing
the total queue occupancy to exceed sch->limit under reordering.

Include sch->q.qlen in the limit check.

Fixes: f8d4bc455047 ("net/sched: netem: account for backlog updates from child qdisc")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20260418032027.900913-3-stephen@networkplumber.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/sched/sch_netem.c