diff options
| author | Xiang Mei <[email protected]> | 2025-07-05 21:21:43 +0000 |
|---|---|---|
| committer | Paolo Abeni <[email protected]> | 2025-07-10 09:08:35 +0000 |
| commit | dd831ac8221e691e9e918585b1003c7071df0379 (patch) | |
| tree | 8af5b853df41c312abd6d5f0bcdc8ad7c5f16a81 /tools/testing/selftests/drivers/net/hw/rss_api.py | |
| parent | Merge branch 'rxrpc-miscellaneous-fixes' (diff) | |
| download | kernel-dd831ac8221e691e9e918585b1003c7071df0379.tar.gz kernel-dd831ac8221e691e9e918585b1003c7071df0379.zip | |
net/sched: sch_qfq: Fix null-deref in agg_dequeue
To prevent a potential crash in agg_dequeue (net/sched/sch_qfq.c)
when cl->qdisc->ops->peek(cl->qdisc) returns NULL, we check the return
value before using it, similar to the existing approach in sch_hfsc.c.
To avoid code duplication, the following changes are made:
1. Changed qdisc_warn_nonwc(include/net/pkt_sched.h) into a static
inline function.
2. Moved qdisc_peek_len from net/sched/sch_hfsc.c to
include/net/pkt_sched.h so that sch_qfq can reuse it.
3. Applied qdisc_peek_len in agg_dequeue to avoid crashing.
Signed-off-by: Xiang Mei <[email protected]>
Reviewed-by: Cong Wang <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Paolo Abeni <[email protected]>
Diffstat (limited to 'tools/testing/selftests/drivers/net/hw/rss_api.py')
0 files changed, 0 insertions, 0 deletions
