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-21 12:27:54

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Thu, 21 Aug 2008 22:22:45 +1000
On Thu, Aug 21, 2008 at 12:19:20PM +0000, Jarek Poplawski wrote:
quoted
Since qdisc_destroy() is used for destroying root qdisc too, isn't it
better to get this lock back in notify_and_destroy() like this:

if (old) {
	if (parent)
		sch_tree_lock()
	qdisc_destroy()
	if (parent)
		sch_tree_unlock()
}
Ugly as it may look, I think this is probably the best fix for now.

For 2.6.28 we can fix it properly and remove this eyesore :)
This looks even worse, actually.

If we just unlinked this thing, we don't want anyone finding
it, even before we grab this lock, to adjust queue counts.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help