summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorWeiming Shi <bestswngs@gmail.com>2026-09-02 23:52:31 +0800
committerJakub Kicinski <kuba@kernel.org>2026-09-05 12:40:05 -0700
commite6662f2100f8d33b0f4d0047c219efd6bba186ea (patch)
tree2c73792c48a255b313d83344484efdbb259fcff3 /include/net
parent2b4707a149a55e8fa75c9ef32b359d60f470a566 (diff)
downloadlinux-e6662f2100f8d33b0f4d0047c219efd6bba186ea.tar.gz
linux-e6662f2100f8d33b0f4d0047c219efd6bba186ea.zip
net/sched: defer qdisc freeing after failed creation
An RTM_NEWQDISC request can make clsact bind a populated shared ingress block during ->init(), publishing an embedded mini_Qdisc to lockless readers. If the same request has an invalid TCA_RATE, estimator setup fails after ->init(); the unwind removes the pointer but synchronously frees its containing qdisc while tc_run() may still hold it. Retire failed qdiscs through the same RCU helper as normal destruction. Inline the synchronous free into the callback now that no direct callers remain. Fixes: 51ab2994c387 ("net: sched: allow ingress and clsact qdiscs to share filter blocks") Reported-by: Xiang Mei <xmei5@asu.edu> Link: https://lore.kernel.org/netdev/20260805102505.740806-1-david.lee@trailofbits.com/ Signed-off-by: Weiming Shi <bestswngs@gmail.com> Link: https://patch.msgid.link/20260902155231.2149915-2-bestswngs@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/sch_generic.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index cbc248776511..f35bd06a6bad 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -793,7 +793,7 @@ void qdisc_offload_query_caps(struct net_device *dev,
struct Qdisc *qdisc_alloc(struct netdev_queue *dev_queue,
const struct Qdisc_ops *ops,
struct netlink_ext_ack *extack);
-void qdisc_free(struct Qdisc *qdisc);
+void qdisc_free_rcu(struct Qdisc *qdisc);
struct Qdisc *qdisc_create_dflt(struct netdev_queue *dev_queue,
const struct Qdisc_ops *ops, u32 parentid,
struct netlink_ext_ack *extack);