summaryrefslogtreecommitdiff
path: root/include/linux/errqueue.h
diff options
context:
space:
mode:
authorStephen Hemminger <stephen@networkplumber.org>2026-04-18 06:19:42 +0300
committerJakub Kicinski <kuba@kernel.org>2026-04-28 03:30:28 +0300
commit01801c359a74737b9b1aa28568b60374d857241a (patch)
tree02fad338f91694404eda2382d465f83feac24b17 /include/linux/errqueue.h
parent986afaf809940577224a99c3a08d97a15eb37e93 (diff)
downloadlinux-01801c359a74737b9b1aa28568b60374d857241a.tar.xz
net/sched: netem: validate slot configuration
Reject slot configurations that have no defensible meaning: - negative min_delay or max_delay - min_delay greater than max_delay - negative dist_delay or dist_jitter - negative max_packets or max_bytes Negative or out-of-order delays underflow in get_slot_next(), producing garbage intervals. Negative limits trip the per-slot accounting (packets_left/bytes_left <= 0) on the first packet of every slot, defeating the rate-limiting half of the slot feature. Note that dist_jitter has been silently coerced to its absolute value by get_slot() since the feature was introduced; rejecting negatives here converts that silent coercion into -EINVAL. The abs() can be removed in a follow-up. Fixes: 836af83b54e3 ("netem: support delivering packets in delayed time slots") Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20260418032027.900913-5-stephen@networkplumber.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux/errqueue.h')
0 files changed, 0 insertions, 0 deletions