]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
netfilter: conntrack: avoid excess memory allocation
authorFlorian Westphal <fw@strlen.de>
Wed, 26 Oct 2016 21:46:17 +0000 (23:46 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 27 Oct 2016 16:29:02 +0000 (18:29 +0200)
This is now a fixed-size extension, so we don't need to pass a variable
alloc size.  This (harmless) error results in allocating 32 instead of
the needed 16 bytes for this extension as the size gets passed twice.

Fixes: 23014011ba420 ("netfilter: conntrack: support a fixed size of 128 distinct labels")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/net/netfilter/nf_conntrack_labels.h

index 498814626e28b7115345308694bb66d240933f9f..1723a67c0b0a887d689c58481189f77f723aa400 100644 (file)
@@ -30,8 +30,7 @@ static inline struct nf_conn_labels *nf_ct_labels_ext_add(struct nf_conn *ct)
        if (net->ct.labels_used == 0)
                return NULL;
 
-       return nf_ct_ext_add_length(ct, NF_CT_EXT_LABELS,
-                                   sizeof(struct nf_conn_labels), GFP_ATOMIC);
+       return nf_ct_ext_add(ct, NF_CT_EXT_LABELS, GFP_ATOMIC);
 #else
        return NULL;
 #endif