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

From: Jarek Poplawski <[email-masked]>
Date: Sun, 31 May 2009 10:12:13 +0200

On Sat, May 30, 2009 at 07:50:18AM -0400, jamal wrote:
> On Sat, 2009-05-30 at 00:59 +0200, Jarek Poplawski wrote:
>   
> > ...
> >         } else {
> >                 switch (n->nlmsg_type) {
> >                 case RTM_NEWTFILTER:
> >                         err = -EEXIST;
> >                         if (n->nlmsg_flags & NLM_F_EXCL)
> >                                 goto errout;
> >                         break;
> > 
> > Probably this case needs tcf_destroy() too.
> 
> No - that if stmnt will fail if this is a new filter being
> created.

If somebody runs tc add filter with a new priority but existing handle
a newly created (and not linked now) tc would be handled with goto
errout and would leak, I guess.

Cheers,
Jarek P.