]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
netfilter: conntrack: handle initial extension alloc via krealloc
authorFlorian Westphal <fw@strlen.de>
Thu, 20 Apr 2017 07:54:24 +0000 (09:54 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 26 Apr 2017 07:30:22 +0000 (09:30 +0200)
commit22d4536d2c836f74421d01d534b3117223a822a0
tree22034a41030a6ce489a687cf4e7a9b3bc3f8b2f1
parent23f671a1b56a4493075ab7263c78c526ac12a592
netfilter: conntrack: handle initial extension alloc via krealloc

krealloc(NULL, ..) is same as kmalloc(), so we can avoid special-casing
the initial allocation after the prealloc removal (we had to use
->alloc_len as the initial allocation size).

This also means we do not zero the preallocated memory anymore; only
offsets[].  Existing code makes sure the new (used) extension space gets
zeroed out.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_conntrack_extend.c