Subject: Re: Oops in filter add

From: Patrick McHardy <[email-masked]>
Date: Tue, 20 Mar 2007 12:02:15 +0100

Chris Madden wrote:
> Thanks for all your replies!
> 
> One thing I did notice in examining tc_ctl_tfilter was that there is
> something like:
> 
>         qdisc_lock_tree(dev);
>         tp->next = *back;
>         *back = tp;
>         qdisc_unlock_tree(dev);
> 
> And then proceed to the data structure down below with:
> 
> err = tp->ops->change(tp, cl, t->tcm_handle, tca, &fh);
> 
> Simply reordering these seems to ameliorate the problem greatly.  I
> don't know if this is a generic solution or something specific to the
> basic filter only. 

It might hide the problem, but there are currently a lot of places
where things can go wrong.