On Fri, Nov 07, 2003 at 12:01:35PM +0000, Nuno Ferreira wrote: > > Well, the problem happened again with a new client, maybe it's caused by > some misconfiguration on the client side. It's OK. That bug has been found already. Here is the patch which was merged in 2.6. -- Debian GNU/Linux 3.0 is out! ( http://www.debian.org/ ) Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Index: kernel-source-2.5/net/xfrm/xfrm_policy.c =================================================================== RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/net/xfrm/xfrm_policy.c,v retrieving revision 1.27 diff -u -r1.27 xfrm_policy.c --- kernel-source-2.5/net/xfrm/xfrm_policy.c 18 Oct 2003 03:09:04 -0000 1.27 +++ kernel-source-2.5/net/xfrm/xfrm_policy.c 27 Oct 2003 09:58:27 -0000 @@ -523,7 +523,6 @@ *polp != NULL; polp = &(*polp)->next) { if (*polp == pol) { *polp = pol->next; - atomic_dec(&pol->refcnt); return pol; } } @@ -579,6 +578,7 @@ write_lock_bh(&xfrm_policy_lock); __xfrm_policy_link(newp, XFRM_POLICY_MAX+dir); write_unlock_bh(&xfrm_policy_lock); + xfrm_pol_put(newp); } return newp; } Index: kernel-source-2.5/net/xfrm/xfrm_state.c =================================================================== RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/net/xfrm/xfrm_state.c,v retrieving revision 1.10 diff -u -r1.10 xfrm_state.c --- kernel-source-2.5/net/xfrm/xfrm_state.c 3 Aug 2003 02:31:37 -0000 1.10 +++ kernel-source-2.5/net/xfrm/xfrm_state.c 27 Oct 2003 09:57:02 -0000 @@ -831,6 +831,7 @@ if (err >= 0) { xfrm_sk_policy_insert(sk, err, pol); + xfrm_pol_put(pol); err = 0; }