Subject: Re: [RFC PATCH]xfrm: fix perpetual bundles

From: Steffen Klassert <[email-masked]>
Date: Tue, 2 Mar 2010 14:46:56 +0100

On Tue, Mar 02, 2010 at 08:10:26AM -0500, jamal wrote:
> On Tue, 2010-03-02 at 20:51 +0800, Herbert Xu wrote:
> 
> > Heh, you've just discovered a bug that I carefully planted back
> > in 2007, while merging the v4/v6 policy code :)
> 
> ;-> I am suprised it hasnt been noticed sooner given it accumulates
> memory on a per-packet basis.

The problem was spotted by 
commit a33bc5c15154c835aae26f16e6a3a7d9ad4acb45
xfrm: select sane defaults for xfrm[4|6] gc_thresh

Before this commit, the xfrm garbage collector started to remove
stale bundle entries as soon as we reached an amount of 1024
bundle entries. Now the default value for the gc_thresh is
based on the main route table hash size, so we can have much more
bundle entries.

> 
> > It is a clear merging error, where *fl became rt->fl which is
> > totally different.  So please try this patch:
> > 
> 
> Looks like it would work.
> I dont have time right now - but will by either tonight or tomorrow
> evening. Steffen, if you have time - please go ahead and try it out
> as well.
> 

I tried it, works for me too.

Thanks,

Steffen