linux-yocto/net/sched
Xiang Mei 11a2eadf0b net/sched: sch_qfq: Avoid triggering might_sleep in atomic context in qfq_delete_class
[ Upstream commit cf074eca00 ]

might_sleep could be trigger in the atomic context in qfq_delete_class.

qfq_destroy_class was moved into atomic context locked
by sch_tree_lock to avoid a race condition bug on
qfq_aggregate. However, might_sleep could be triggered by
qfq_destroy_class, which introduced sleeping in atomic context (path:
qfq_destroy_class->qdisc_put->__qdisc_destroy->lockdep_unregister_key
->might_sleep).

Considering the race is on the qfq_aggregate objects, keeping
qfq_rm_from_agg in the lock but moving the left part out can solve
this issue.

Fixes: 5e28d5a3f7 ("net/sched: sch_qfq: Fix race condition on qfq_aggregate")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Xiang Mei <xmei5@asu.edu>
Link: https://patch.msgid.link/4a04e0cc-a64b-44e7-9213-2880ed641d77@sabinyo.mountain
Reviewed-by: Cong Wang <xiyou.wangcong@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://patch.msgid.link/20250717230128.159766-1-xmei5@asu.edu
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-08-01 09:48:41 +01:00
..
act_api.c net/sched: act_api: deny mismatched skip_sw/skip_hw flags for actions created by classifiers 2024-10-23 11:31:27 +02:00
act_bpf.c
act_connmark.c
act_csum.c
act_ct.c sched: act_ct: avoid -Wflex-array-member-not-at-end warning 2024-08-12 17:54:24 -07:00
act_ctinfo.c
act_gact.c
act_gate.c
act_ife.c
act_meta_mark.c
act_meta_skbprio.c
act_meta_skbtcindex.c
act_mirred.c
act_mpls.c
act_nat.c
act_pedit.c
act_police.c
act_sample.c net: sched: act_sample: add action cookie to sample 2024-07-05 17:45:47 -07:00
act_simple.c
act_skbedit.c
act_skbmod.c net/sched: act_skbmod: convert comma to semicolon 2024-07-11 17:12:15 -07:00
act_tunnel_key.c net: fix geneve_opt length integer overflow 2025-04-10 14:39:34 +02:00
act_vlan.c tc: adjust network header after 2nd vlan push 2024-08-27 11:37:42 +02:00
cls_api.c tc: Ensure we have enough buffer space when sending filter netlink notifications 2025-04-20 10:15:07 +02:00
cls_basic.c
cls_bpf.c net: sched: refine software bypass handling in tc_run 2025-02-08 09:57:25 +01:00
cls_cgroup.c
cls_flow.c net_sched: cls_flow: validate TCA_FLOW_RSHIFT attribute 2025-01-17 13:40:37 +01:00
cls_flower.c net: fix geneve_opt length integer overflow 2025-04-10 14:39:34 +02:00
cls_fw.c
cls_matchall.c net: sched: refine software bypass handling in tc_run 2025-02-08 09:57:25 +01:00
cls_route.c
cls_u32.c net: sched: refine software bypass handling in tc_run 2025-02-08 09:57:25 +01:00
em_canid.c
em_cmp.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
em_ipset.c
em_ipt.c
em_meta.c
em_nbyte.c
em_text.c
em_u32.c
ematch.c
Kconfig
Makefile
sch_api.c net/sched: Abort __tc_modify_qdisc if parent class does not exist 2025-07-17 18:37:07 +02:00
sch_blackhole.c
sch_cake.c sched: sch_cake: add bounds checks to host bulk flow fairness counts 2025-01-17 13:40:41 +01:00
sch_cbs.c net/sched: cbs: Fix integer overflow in cbs_set_port_rate() 2024-12-14 20:03:47 +01:00
sch_choke.c net: sched: fix ordering of qlen adjustment 2024-12-27 14:01:57 +01:00
sch_codel.c net_sched: Flush gso_skb list too during ->change() 2025-05-22 14:29:39 +02:00
sch_drr.c sch_drr: make drr_qlen_notify() idempotent 2025-05-09 09:50:50 +02:00
sch_etf.c
sch_ets.c net_sched: ets: fix a race in ets_qdisc_change() 2025-06-19 15:32:31 +02:00
sch_fifo.c pfifo_tail_enqueue: Drop new packet when sch->limit == 0 2025-02-17 10:05:01 +01:00
sch_fq_codel.c net_sched: Flush gso_skb list too during ->change() 2025-05-22 14:29:39 +02:00
sch_fq_pie.c net_sched: Flush gso_skb list too during ->change() 2025-05-22 14:29:39 +02:00
sch_fq.c net_sched: Flush gso_skb list too during ->change() 2025-05-22 14:29:39 +02:00
sch_frag.c
sch_generic.c ptr_ring: do not block hard interrupts in ptr_ring_resize_multiple() 2025-02-08 09:57:07 +01:00
sch_gred.c sched: address a potential NULL pointer dereference in the GRED scheduler. 2025-03-22 12:54:10 -07:00
sch_hfsc.c net_sched: hfsc: Address reentrant enqueue adding class to eltree twice 2025-06-04 14:43:51 +02:00
sch_hhf.c net_sched: Flush gso_skb list too during ->change() 2025-05-22 14:29:39 +02:00
sch_htb.c net/sched: Return NULL when htb_lookup_leaf encounters an empty rbtree 2025-07-24 08:56:35 +02:00
sch_ingress.c bpf: Fix too early release of tcx_entry 2024-07-08 14:07:31 -07:00
sch_mq.c
sch_mqprio_lib.c
sch_mqprio_lib.h
sch_mqprio.c
sch_multiq.c net: sched: sch_multiq: fix possible OOB write in multiq_tune() 2024-06-05 10:50:19 +01:00
sch_netem.c netem: Update sch->q.qlen before qdisc_tree_reduce_backlog() 2025-02-17 10:05:01 +01:00
sch_pie.c net_sched: Flush gso_skb list too during ->change() 2025-05-22 14:29:39 +02:00
sch_plug.c
sch_prio.c net_sched: prio: fix a race in prio_tune() 2025-06-19 15:32:31 +02:00
sch_qfq.c net/sched: sch_qfq: Avoid triggering might_sleep in atomic context in qfq_delete_class 2025-08-01 09:48:41 +01:00
sch_red.c net_sched: red: fix a race in __red_change() 2025-06-19 15:32:31 +02:00
sch_sfb.c
sch_sfq.c net_sched: sch_sfq: reject invalid perturb period 2025-06-27 11:11:38 +01:00
sch_skbprio.c net_sched: skbprio: Remove overly strict queue assertions 2025-04-10 14:39:33 +02:00
sch_taprio.c net/sched: fix use-after-free in taprio_dev_notifier 2025-06-27 11:11:21 +01:00
sch_tbf.c net_sched: tbf: fix a race in tbf_change() 2025-06-19 15:32:31 +02:00
sch_teql.c