diff options
author | Florian Westphal <fw@strlen.de> | 2016-10-26 23:46:17 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-10-27 18:29:02 +0200 |
commit | cdb436d181d21af4d273b49ec7734eecd6a37fe9 (patch) | |
tree | 01842ce4065a1ece498be77de1c33955ba70781d /include/net/netfilter | |
parent | f1d505bb762e30bf316ff5d3b604914649d6aed3 (diff) | |
download | op-kernel-dev-cdb436d181d21af4d273b49ec7734eecd6a37fe9.zip op-kernel-dev-cdb436d181d21af4d273b49ec7734eecd6a37fe9.tar.gz |
netfilter: conntrack: avoid excess memory allocation
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>
Diffstat (limited to 'include/net/netfilter')
-rw-r--r-- | include/net/netfilter/nf_conntrack_labels.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/net/netfilter/nf_conntrack_labels.h b/include/net/netfilter/nf_conntrack_labels.h index 4988146..1723a67 100644 --- a/include/net/netfilter/nf_conntrack_labels.h +++ b/include/net/netfilter/nf_conntrack_labels.h @@ -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 |