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

From: Jarek Poplawski <[email-masked]>
Date: Thu, 21 Aug 2008 20:58:57 +0200

On Thu, Aug 21, 2008 at 11:12:18PM +1000, Herbert Xu wrote:
> On Thu, Aug 21, 2008 at 12:55:01PM +0000, Jarek Poplawski wrote:
> > 
> > Alas I've to have a break now, anyway I think for now "my" proposal
> > should be safer since it worked like this before... But of course
> > after good checking your patch should be better.
> 
> Well your patch doesn't work and my patch doesn't compile :)
> 
> The problem is that qdisc_lookup walks through every txq's list while
> the sch_tree_lock protects a single txq only.

I don't think there is such a problem. I thought you and David were
concerned with something trying to find and use this qdisc: that's why
I wrote it's nobody ancestor at the moment. sch_tree_lock() should be
enough for now because in the current implementation we have only one
root qdisc with pointers copied to every dev_queue. At least I can't
see nothing more in qdisc_create() and qdisc_graft(). So,
qdisc_lookup() seems to be designed for the future (or to do this
lookup more exactly with additional loops...). 

Cheers,
Jarek P.