Commit d9aaaf22 authored by Davidlohr Bueso's avatar Davidlohr Bueso Committed by Pablo Neira Ayuso

netfilter: ebtables: allocate chainstack on CPU local nodes

Keep the per-CPU memory allocated for chainstacks local.
Signed-off-by: default avatarDavidlohr Bueso <dbueso@suse.de>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 3e6ed770
......@@ -926,7 +926,9 @@ static int translate_table(struct net *net, const char *name,
return -ENOMEM;
for_each_possible_cpu(i) {
newinfo->chainstack[i] =
vmalloc(array_size(udc_cnt, sizeof(*(newinfo->chainstack[0]))));
vmalloc_node(array_size(udc_cnt,
sizeof(*(newinfo->chainstack[0]))),
cpu_to_node(i));
if (!newinfo->chainstack[i]) {
while (i)
vfree(newinfo->chainstack[--i]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment