Re: [IPSEC] Fix refcnt leak in xfrm_lookup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 09, 2003 at 08:50:16PM +1000, James Morris wrote:
> On Wed, 9 Jul 2003, Herbert Xu wrote:
> 
> > This patch fixes a refcnt leak when the policy changes on us in
> > xfrm_lookup.
> 
> Looks like you forgot to attach the patch :-)

Oops :) Here it is.
-- 
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.18
diff -u -r1.18 xfrm_policy.c
--- kernel-source-2.5/net/xfrm/xfrm_policy.c	5 Jul 2003 22:54:05 -0000	1.18
+++ kernel-source-2.5/net/xfrm/xfrm_policy.c	9 Jul 2003 10:08:35 -0000
@@ -793,8 +793,10 @@
 					goto error;
 				}
 				if (err == -EAGAIN ||
-				    genid != atomic_read(&flow_cache_genid))
+				    genid != atomic_read(&flow_cache_genid)) {
+					xfrm_pol_put(policy);
 					goto restart;
+				}
 			}
 			if (err)
 				goto error;

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux