提交 3b84e92b 编写于 作者: P Patrick McHardy 提交者: David S. Miller

[NETFILTER]: ip6_tables: use vmalloc_node()

Consistently use vmalloc_node for all counter allocations.
Signed-off-by: NPatrick McHardy <kaber@trash.net>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 f173c8a1
......@@ -959,7 +959,7 @@ copy_entries_to_user(unsigned int total_size,
(other than comefrom, which userspace doesn't care
about). */
countersize = sizeof(struct xt_counters) * private->number;
counters = vmalloc(countersize);
counters = vmalloc_node(countersize, numa_node_id());
if (counters == NULL)
return -ENOMEM;
......@@ -1080,7 +1080,8 @@ do_replace(void __user *user, unsigned int len)
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) {
ret = -ENOMEM;
goto free_newinfo;
......@@ -1186,7 +1187,7 @@ do_add_counters(void __user *user, unsigned int len)
if (len != sizeof(tmp) + tmp.num_counters*sizeof(struct xt_counters))
return -EINVAL;
paddc = vmalloc(len);
paddc = vmalloc_node(len, numa_node_id());
if (!paddc)
return -ENOMEM;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册