Subject: Re: [BUG] net_cls: Panic occured when net_cls subsystem use

From: Jarek Poplawski <[email-masked]>
Date: Sun, 31 May 2009 09:55:29 +0200

On Sat, May 30, 2009 at 07:08:53PM -0400, jamal wrote:
> On Sat, 2009-05-30 at 16:00 +0200, Jarek Poplawski wrote:
> > On Sat, May 30, 2009 at 09:31:37AM -0400, jamal wrote:
> > > What were you suggesting to change in cls_group to avoid this oops?
> > 
> > I think checking the head (tp->root) for NULL like in cls_fw or
> > cls_route should work.
> 
> IMHO that is a workaround for the tp linking bug
> [IOW, there is no need to check for tp->root == NULL (in the fast path)
> if such an illegal tp was never linked to begin with (on the slow
> path)].
> 
> So those classifiers you point to need to be fixed afterwards (but 
> not -stable material).
> My thinking of fixing them to do proper init/get as well later.

Sure, after fixing it properly we should get rid of unneeded checks.

> > Anyway, it's worked for other classifiers like this for some time...
> 
> Would you agree that it is/was a bandaid?
> Or maybe you have some other fear that this may break something else and
> prefer the workaround instead?

If somebody decided to do it this way instead of the "proper" fix then
it looks to me more like a bandaid "by design". And, yes, I have some
fear we could break some strange configs, which could depend on this
wrong but working design.

Cheers,
Jarek P.