Re: Possible memory leak in xfrm_policy_insert

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

 



On Sat, May 31, 2003 at 09:12:02PM -0700, David S. Miller wrote:
> 
> The policy table holds a reference to the object, "delpol"
> has just been deleted from that table, therefore we must "put"
> that reference.

Hmm, the flow table does contain a reference, but we don't delete
it while we're in policy_insert.  That's handled by the genid.
There is definitely a problem there as it only does a dec on the
refcnt which looks like a possible leak.

xfrm_policy_list doesn't seem to hold any reference to the policy
apart from the one in policy_alloc.

> Check for zero refcount at this spot if you don't believe me :-)

Well I did and I got plenty of zeros after the policy_kill call :)
It happens with policies that haven't entered the flow cache yet.
-- 
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
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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