Re: Possible memory leak in xfrm_policy_insert

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

 



   From: Herbert Xu <herbert@gondor.apana.org.au>
   Date: Sun, 1 Jun 2003 09:20:59 +1000

   The atomic_dec on delpol->refcnt looks a bit sus.

Not at all.

The policy table holds a reference to the object, "delpol"
has just been deleted from that table, therefore we must "put"
that reference.

The policy also has "self" reference, and after the policy is marked
dead (via xfrm_policy_kill) we must kill off that final reference with
xfrm_pol_put().

Check for zero refcount at this spot if you don't believe me :-)
-
: 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