forked from Minki/linux
netfilter: ebtables: allocate chainstack on CPU local nodes
Keep the per-CPU memory allocated for chainstacks local. Signed-off-by: Davidlohr Bueso <dbueso@suse.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
parent
3e6ed7703d
commit
d9aaaf2232
@ -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]);
|
||||
|
Loading…
Reference in New Issue
Block a user