diff options
author | Patrick McHardy <kaber@trash.net> | 2007-12-05 02:25:26 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 17:55:54 -0500 |
commit | 9e67d5a739327c44885adebb4f3a538050be73e4 (patch) | |
tree | d0b3af726738fedec500ade95dad21be76610e73 | |
parent | 259d4e41f3ec25f22169daece42729f597b89f9a (diff) |
[NETFILTER]: x_tables: remove obsolete overflow check
We're not multiplying the size with the number of CPUs anymore, so the
check is obsolete.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/ipv4/netfilter/arp_tables.c | 2 | ||||
-rw-r--r-- | net/ipv4/netfilter/ip_tables.c | 2 | ||||
-rw-r--r-- | net/ipv6/netfilter/ip6_tables.c | 2 |
3 files changed, 0 insertions, 6 deletions
diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c index a21722d5c9fa..d5cae7e906cf 100644 --- a/net/ipv4/netfilter/arp_tables.c +++ b/net/ipv4/netfilter/arp_tables.c | |||
@@ -811,8 +811,6 @@ static int do_replace(void __user *user, unsigned int len) | |||
811 | return -ENOPROTOOPT; | 811 | return -ENOPROTOOPT; |
812 | 812 | ||
813 | /* overflow check */ | 813 | /* overflow check */ |
814 | if (tmp.size >= INT_MAX / num_possible_cpus()) | ||
815 | return -ENOMEM; | ||
816 | if (tmp.num_counters >= INT_MAX / sizeof(struct xt_counters)) | 814 | if (tmp.num_counters >= INT_MAX / sizeof(struct xt_counters)) |
817 | return -ENOMEM; | 815 | return -ENOMEM; |
818 | 816 | ||
diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c index 87d369244bd9..64ffe57ef1b3 100644 --- a/net/ipv4/netfilter/ip_tables.c +++ b/net/ipv4/netfilter/ip_tables.c | |||
@@ -1323,8 +1323,6 @@ do_replace(void __user *user, unsigned int len) | |||
1323 | return -ENOPROTOOPT; | 1323 | return -ENOPROTOOPT; |
1324 | 1324 | ||
1325 | /* overflow check */ | 1325 | /* overflow check */ |
1326 | if (tmp.size >= INT_MAX / num_possible_cpus()) | ||
1327 | return -ENOMEM; | ||
1328 | if (tmp.num_counters >= INT_MAX / sizeof(struct xt_counters)) | 1326 | if (tmp.num_counters >= INT_MAX / sizeof(struct xt_counters)) |
1329 | return -ENOMEM; | 1327 | return -ENOMEM; |
1330 | 1328 | ||
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c index e60c1b4b1ec8..d3e884a5c6a8 100644 --- a/net/ipv6/netfilter/ip6_tables.c +++ b/net/ipv6/netfilter/ip6_tables.c | |||
@@ -1042,8 +1042,6 @@ do_replace(void __user *user, unsigned int len) | |||
1042 | return -EFAULT; | 1042 | return -EFAULT; |
1043 | 1043 | ||
1044 | /* overflow check */ | 1044 | /* overflow check */ |
1045 | if (tmp.size >= INT_MAX / num_possible_cpus()) | ||
1046 | return -ENOMEM; | ||
1047 | if (tmp.num_counters >= INT_MAX / sizeof(struct xt_counters)) | 1045 | if (tmp.num_counters >= INT_MAX / sizeof(struct xt_counters)) |
1048 | return -ENOMEM; | 1046 | return -ENOMEM; |
1049 | 1047 | ||