linux/include
Xiang Mei 1bed56f089 net/sched: sch_qfq: Fix null-deref in agg_dequeue
commit dd831ac822 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2025-12-07 06:09:12 +09:00
..
acpi ACPICA: Avoid sequence overread in call to strncmp() 2025-06-27 11:05:27 +01:00
asm-generic asm-generic: Add memory barrier dma_mb() 2025-08-28 16:24:36 +02:00
clocksource x86/hyperv: Fix hv tsc page based sched_clock for hibernation 2025-01-09 13:28:42 +01:00
crypto crypto: af_alg - Fix incorrect boolean values in af_alg_ctx 2025-10-02 13:39:13 +02:00
drm drm/gem: Fix race in drm_gem_handle_create_tail() 2025-07-17 18:30:49 +02:00
dt-bindings clk: ti: am43xx: Add clkctrl data for am43xx ADC1 2025-07-10 15:57:35 +02:00
keys KEYS: trusted: allow use of kernel RNG for key material 2023-10-19 23:05:33 +02:00
kunit kunit: fix kernel-doc warnings due to mismatched arg names 2021-10-06 17:54:07 -06:00
kvm KVM: arm64: vgic-v4: Make the doorbell request robust w.r.t preemption 2024-07-05 09:14:51 +02:00
linux usb: gadget: Introduce free_usb_request helper 2025-10-29 14:03:15 +01:00
math-emu math-emu: Fix fall-through warning 2021-07-13 13:57:44 -05:00
media media: v4l: Memset argument to 0 before calling get_mbus_config pad op 2025-06-04 14:38:02 +02:00
memory memory: renesas-rpc-if: Fix HF/OSPI data transfer in Manual Mode 2022-05-09 09:14:34 +02:00
misc ocxl: Update the Process Element Entry 2020-12-04 01:01:30 +11:00
net net/sched: sch_qfq: Fix null-deref in agg_dequeue 2025-12-07 06:09:12 +09:00
pcmcia pcmcia: Replace zero-length array with flexible-array 2020-05-18 10:28:31 +02:00
ras Revert "mm/memory-failure.c: fix race with changing page compound again" 2022-07-12 16:35:17 +02:00
rdma RDMA/uverbs: Propagate errors from rdma_lookup_get_uobject() 2025-06-04 14:37:57 +02:00
scsi scsi: libsas: Add sas_task_find_rq() 2025-10-19 16:21:40 +02:00
soc soc: qcom: rpmh-rsc: Enhance check for VRM in-flight request 2024-06-16 13:39:55 +02:00
sound ASoC: soc-dai.h: merge DAI call back functions into ops 2025-08-28 16:24:26 +02:00
target scsi: target: Fix multiple LUN_RESET handling 2023-05-11 23:00:26 +09:00
trace filelock: add FL_RECLAIM to show_fl_flags() macro 2025-10-19 16:21:28 +02:00
uapi net: netlink: add NLM_F_BULK delete request modifier 2025-10-29 14:03:10 +01:00
vdso time64.h: Consolidated PSEC_PER_SEC definition 2021-04-06 16:32:17 -07:00
video video: of_display_timing.h: include errno.h 2022-07-12 16:35:10 +02:00
xen xen: replace xen_remap() with memremap() 2025-07-17 18:30:48 +02:00