Thread (6 messages) 6 messages, 4 authors, 2015-07-20

Re: [RGC PATCH v3.10] net: sched: validate that class is found in qdisc_tree_decrease_qlen

flat view

From: Alex Gartrell <hidden>
Date: 2015-07-18 00:27:21

On Fri, Jul 17, 2015 at 5:10 PM, Cong Wang [off-list ref] wrote:
Hmm, but in htb_delete() we do reset the leaf qdisc before removing the
class from ha

        if (!cl->level) {
                qlen = cl->un.leaf.q->q.qlen;
                qdisc_reset(cl->un.leaf.q);
                qdisc_tree_decrease_qlen(cl->un.leaf.q, qlen);
        }

therefore, the leaf fq_codel qdisc is supposed to have 0 skb after that,
that is, the second fq_codel_reset() is supposed to return NULL immediately?
Why is qdidsc_tree_decrease_qlen() called in the second fq_codel_reset()?

Or there is a race condition between ->delete() and ->put()? In which new
skb can be enqueued?
This makes the most sense to me, but I have ~32 hours of experience
with this subsystem :)

Taking that for granted, it seems like it'd be appropriate to note the
invariant in the code i've changed with a WARN_ON and to skip it, and
then to otherwise find a way to close the hole.  Do you agree?

-- 
Alex Gartrell [off-list ref]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help