Commit 19763120 authored by Patrick McHardy's avatar Patrick McHardy Committed by David S. Miller

[NETFILTER]: arp_tables: use vmalloc_node()

Use vmalloc_node() as in ip_tables.c.
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0495cf95
...@@ -804,7 +804,8 @@ static int do_replace(void __user *user, unsigned int len) ...@@ -804,7 +804,8 @@ static int do_replace(void __user *user, unsigned int len)
goto free_newinfo; goto free_newinfo;
} }
counters = vmalloc(tmp.num_counters * sizeof(struct xt_counters)); counters = vmalloc_node(tmp.num_counters * sizeof(struct xt_counters),
numa_node_id());
if (!counters) { if (!counters) {
ret = -ENOMEM; ret = -ENOMEM;
goto free_newinfo; goto free_newinfo;
...@@ -902,7 +903,7 @@ static int do_add_counters(void __user *user, unsigned int len) ...@@ -902,7 +903,7 @@ static int do_add_counters(void __user *user, unsigned int len)
if (len != sizeof(tmp) + tmp.num_counters*sizeof(struct xt_counters)) if (len != sizeof(tmp) + tmp.num_counters*sizeof(struct xt_counters))
return -EINVAL; return -EINVAL;
paddc = vmalloc(len); paddc = vmalloc_node(len, numa_node_id());
if (!paddc) if (!paddc)
return -ENOMEM; return -ENOMEM;
......
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