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

From: Patrick McHardy <[email-masked]>
Date: Mon, 04 Dec 2006 17:39:29 +0100

Thomas Graf wrote:
> * jamal <[email-masked]> 2006-12-04 11:25
> 
>>On Mon, 2006-04-12 at 16:34 +0100, Patrick McHardy wrote:
>>
>>>Fix a regression from my nfmark mask patch for cls_fw.
>>>
>>>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.
>>
>>AFAIK, that has been there forever. Alexey may know. I am not
>>sure if removing it will break any scripts etc.
> 
> 
> You mean the scripts get upset when the kernel oopses?

Well, it won't oops without my broken patch :)

It just seems this code is entirely useless and the only
thing it does is cause short term unexpected behaviour
during the race I mentioned.

One thing we should probably do is to move the tp->root
allocation to the init function in cls_fw and the others
implementing it as dummy to at least close the race
between ->init and ->change. I'll look into that as a
follow-up patch.