summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorDavidlohr Bueso <dave@stgolabs.net>2021-10-10 21:24:39 +0300
committerPablo Neira Ayuso <pablo@netfilter.org>2021-10-18 01:23:57 +0300
commitd9aaaf223297f6146d9d7f36caca927c92ab855a (patch)
tree42f3a5e77dc5ab9800162d9771b09373b3bdf705 /net
parent3e6ed7703dae6838c104d73d3e76e9b79f5c0528 (diff)
downloadlinux-d9aaaf223297f6146d9d7f36caca927c92ab855a.tar.xz
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>
Diffstat (limited to 'net')
-rw-r--r--net/bridge/netfilter/ebtables.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c
index 83d1798dfbb4..ba045f35114d 100644
--- a/net/bridge/netfilter/ebtables.c
+++ b/net/bridge/netfilter/ebtables.c
@@ -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]);