Thread (209 messages) 209 messages, 10 authors, 2008-09-24

Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().

From: David Miller <davem@davemloft.net>
Date: 2008-08-22 10:27:34

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Fri, 22 Aug 2008 20:07:08 +1000
Yes the ingress hierachy has a single root, i.e., it's a tree.  But
that has nothing to do with what I was talking about.  I'm talking
about the list at dev->rx_queue.qdisc_sleeping->list which is
certainly not guaranteed to be empty.
It is guarenteed to be empty.

Only root qdiscs go to rx_queue.qdisc_sleeping, and such qdiscs
will always have an empty list.
If you look at qdisc_create you'll find that every time we create
a non-root ingress qdisc we add it to that list (we have to,
otherwise qdisc_lookup doesn't work at all for ingress qdiscs).
We don't allow non-root ingress qdiscs.  All ingress qdiscs
always take the device graft path, and always have a parent
of TC_H_INGRESS, and always operate on rx_queue.
So when somebody on the TX side does a qdisc_lookup they may be
walking the RX list without any protection.  Similarly, if somebody
on the ingress side does qdisc_lookup they may walk the TX lists
without protection.
Ingress data paths do not do qdisc_lookup().  There is only root
allowed for ingress and thus rx_queue's non-default qdiscs.

Add some assertions and run some test tc commands if you don't believe
me :)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help