Message ID | 20230728153537.1865379-5-pctammela@mojatatu.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 7118f56e04d4f89318ad222e210ba70da19a8d15 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net/sched: improve class lifetime handling | expand |
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c index 05c8291865ae..0d947414e616 100644 --- a/net/sched/sch_htb.c +++ b/net/sched/sch_htb.c @@ -1709,8 +1709,10 @@ static int htb_delete(struct Qdisc *sch, unsigned long arg, * tc subsys guarantee us that in htb_destroy it holds no class * refs so that we can remove children safely there ? */ - if (cl->children || qdisc_class_in_use(&cl->common)) + if (cl->children || qdisc_class_in_use(&cl->common)) { + NL_SET_ERR_MSG(extack, "HTB class in use"); return -EBUSY; + } if (!cl->level && htb_parent_last_child(cl)) last_child = 1;