Re: [PATCH 3/3] netfilter: xt_CT: remove a compile warning

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

Pablo Neira Ayuso wrote:
> A bit better patch, no need to hold rcu_read_lock again in
> xt_ct_tg_timeout_put (even if that doesn't harm).

Patch looks OK.

By the way,

665 static struct nf_conn *
666 __nf_conntrack_alloc(struct net *net, u16 zone,
667                      const struct nf_conntrack_tuple *orig,
668                      const struct nf_conntrack_tuple *repl,
669                      gfp_t gfp, u32 hash)
670 {
(...snipped...)
680         atomic_inc(&net->ct.count);
(...snipped...)
698         ct = kmem_cache_alloc(net->ct.nf_conntrack_cachep, gfp);
699         if (ct == NULL) {
700                 atomic_dec(&net->ct.count);
701                 return ERR_PTR(-ENOMEM);
702         }
(...snipped...)
720         if (zone) {
721                 struct nf_conntrack_zone *nf_ct_zone;
722 
723                 nf_ct_zone = nf_ct_ext_add(ct, NF_CT_EXT_ZONE, GFP_ATOMIC);
724                 if (!nf_ct_zone)
725                         goto out_free;
726                 nf_ct_zone->id = zone;
727         }
(...snipped...)
737 out_free:

I think we want to call atomic_dec() here.

738         kmem_cache_free(net->ct.nf_conntrack_cachep, ct);
739         return ERR_PTR(-ENOMEM);
740 #endif
741 }
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux Kernel Discussion]     [Ethernet Bridging]     [Linux Wireless Networking]     [Linux Bluetooth Networking]     [Linux Networking Users]     [VLAN]     [Git]     [IETF Annouce]     [Linux Assembly]     [Security]     [Bugtraq]     [Photo]     [Singles Social Networking]     [Yosemite Information]     [MIPS Linux]     [ARM Linux Kernel]     [ARM Linux]     [Linux Virtualization]     [Linux Security]     [Linux IDE]     [Linux RAID]     [Linux SCSI]     [Free Dating]

Add to Google Powered by Linux