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

From: Jarek Poplawski <[email-masked]>
Date: Tue, 19 Aug 2008 07:23:48 +0000

On Tue, Aug 19, 2008 at 12:03:07AM -0700, David Miller wrote:
> From: Jarek Poplawski <[email-masked]>
> Date: Tue, 19 Aug 2008 06:46:09 +0000
> 
> > Actually, I, and earlier Herbert, have written about destroying root
> > qdiscs without sch_tree_lock(). I don't know how Herbert, but I'd
> > prefer to leave here this lock for child qdiscs: they can remove some
> > common structures, so this needs more checking, and even if they don't
> > do this currently, there is no need to remove this possibility here.
> > Similarly, I'm not sure if removing BH protection is really needed
> > here.
> 
> Well you don't really know if this happens or not for sure
> do you? :-)

Actually, you are the author, and I'm here only to make some FUD...

> Why don't you go make sure of this and report back what you
> find?  I see no reason to account for something that cannot
> happen.

Sure, this can be done, but needs some time. And removing such old
locking could be treacherous, so I'd say otherwise, let's leave it
where we are not sure (and where it's not necessary) until more
checking. Currently I think mostly of something like cls_u32(). And
it's not the easiest to analyze piece of code.

> It's better to have a consistent rule for qdisc_destroy()
> rather than a bunch of special cases that are hard to audit.

I don't agree with this: there is a difference between doing total
destruction, when you are sure proper order doesn't matter, and
nobody will ever read after this.

Jarek P.