Subject: Re: [NET_SCHED]: cls_fw: fix NULL pointer dereference

From: Patrick McHardy <[email-masked]>
Date: Wed, 06 Dec 2006 18:17:50 +0100

Jarek Poplawski wrote:
> On 04-12-2006 16:34, Patrick McHardy wrote:
> 
>>Thomas, Jamal, do you have an idea what this "old method" stuff
>>is used for? It seems it is only used during the below mentioned
>>race.
> 
> 
> Sorry for eavesdropping, but have a look at htb_classify
> starting comment. It is also used by unofficial but quite
> popular IPMARK target. 

Yes I know, I just didn't see how it could be configured to
really use that code. But while trying to explain the flow
that would always lead to tp->root != NULL in this mail, I
noticed I missed something :)

At the top of fw_change:

        if (!opt)
                return handle ? -EINVAL : 0;

which happens when adding a fw classifier without specifying any
arguments. My previous fix is still enough, but we can't remove
this of course.