Eric Dumazet <eric.dumazet@xxxxxxxxx> writes: > On Wed, 2017-08-23 at 17:26 +0200, Florian Westphal wrote: >> From: Aaron Conole <aconole@xxxxxxxxxx> > > ... > >> -static struct nf_hook_entry __rcu **nf_hook_entry_head(struct net >> *net, const struct nf_hook_ops *reg) >> +static struct nf_hook_entries *allocate_hook_entries_size(u16 num) >> +{ >> + struct nf_hook_entries *e; >> + size_t alloc = sizeof(*e) + >> + sizeof(struct nf_hook_entry) * num + >> + sizeof(struct nf_hook_ops *) * num; >> + >> + if (num == 0) >> + return NULL; >> + >> + e = kvmalloc(alloc, GFP_KERNEL); >> + if (e) { >> + memset(e, 0, alloc); >> + e->num_hook_entries = num; >> + } > > > nit: > > e = kvzalloc(alloc, GFP_KERNEL); > if (e) > e->num_hook_entries = num; d'oh! Thanks for spotting. -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html