summaryrefslogtreecommitdiff
path: root/rust/helpers/cpu.c
diff options
context:
space:
mode:
authorXiang Mei <xmei5@asu.edu>2025-07-05 14:21:43 -0700
committerPaolo Abeni <pabeni@redhat.com>2025-07-10 11:08:35 +0200
commitdd831ac8221e691e9e918585b1003c7071df0379 (patch)
tree8af5b853df41c312abd6d5f0bcdc8ad7c5f16a81 /rust/helpers/cpu.c
parent0fda5ccf5425c7b92eaca868a3fba8a3c9f8b746 (diff)
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 <xmei5@asu.edu> Reviewed-by: Cong Wang <xiyou.wangcong@gmail.com> Link: https://patch.msgid.link/20250705212143.3982664-1-xmei5@asu.edu Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'rust/helpers/cpu.c')
0 files changed, 0 insertions, 0 deletions