aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-12-18 00:48:33 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 17:58:33 -0500
commit3b84e92b0d54864b0731c3ab3c20dd140bb3d7d9 (patch)
tree9c8d218fd912224f4df2c8db5882973511a74a8d /net/ipv6
parentf173c8a1f2c0ca39f45bb15b82ad5e6fe908556d (diff)
[NETFILTER]: ip6_tables: use vmalloc_node()
Consistently use vmalloc_node for all counter allocations. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/netfilter/ip6_tables.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c
index 655c221acd1a..d0b5fa6661f5 100644
--- a/net/ipv6/netfilter/ip6_tables.c
+++ b/net/ipv6/netfilter/ip6_tables.c
@@ -959,7 +959,7 @@ copy_entries_to_user(unsigned int total_size,
959 (other than comefrom, which userspace doesn't care 959 (other than comefrom, which userspace doesn't care
960 about). */ 960 about). */
961 countersize = sizeof(struct xt_counters) * private->number; 961 countersize = sizeof(struct xt_counters) * private->number;
962 counters = vmalloc(countersize); 962 counters = vmalloc_node(countersize, numa_node_id());
963 963
964 if (counters == NULL) 964 if (counters == NULL)
965 return -ENOMEM; 965 return -ENOMEM;
@@ -1080,7 +1080,8 @@ do_replace(void __user *user, unsigned int len)
1080 goto free_newinfo; 1080 goto free_newinfo;
1081 } 1081 }
1082 1082
1083 counters = vmalloc(tmp.num_counters * sizeof(struct xt_counters)); 1083 counters = vmalloc_node(tmp.num_counters * sizeof(struct xt_counters),
1084 numa_node_id());
1084 if (!counters) { 1085 if (!counters) {
1085 ret = -ENOMEM; 1086 ret = -ENOMEM;
1086 goto free_newinfo; 1087 goto free_newinfo;
@@ -1186,7 +1187,7 @@ do_add_counters(void __user *user, unsigned int len)
1186 if (len != sizeof(tmp) + tmp.num_counters*sizeof(struct xt_counters)) 1187 if (len != sizeof(tmp) + tmp.num_counters*sizeof(struct xt_counters))
1187 return -EINVAL; 1188 return -EINVAL;
1188 1189
1189 paddc = vmalloc(len); 1190 paddc = vmalloc_node(len, numa_node_id());
1190 if (!paddc) 1191 if (!paddc)
1191 return -ENOMEM; 1192 return -ENOMEM;
1192 1193