[NETFILTER]: x_tables: remove obsolete overflow check
authorPatrick McHardy <kaber@trash.net>
Wed, 5 Dec 2007 07:25:26 +0000 (23:25 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 22:55:54 +0000 (14:55 -0800)
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>
net/ipv4/netfilter/arp_tables.c
net/ipv4/netfilter/ip_tables.c
net/ipv6/netfilter/ip6_tables.c

index a21722d..d5cae7e 100644 (file)
@@ -811,8 +811,6 @@ static int do_replace(void __user *user, unsigned int len)
                return -ENOPROTOOPT;
 
        /* overflow check */
-       if (tmp.size >= INT_MAX / num_possible_cpus())
-               return -ENOMEM;
        if (tmp.num_counters >= INT_MAX / sizeof(struct xt_counters))
                return -ENOMEM;
 
index 87d3692..64ffe57 100644 (file)
@@ -1323,8 +1323,6 @@ do_replace(void __user *user, unsigned int len)
                return -ENOPROTOOPT;
 
        /* overflow check */
-       if (tmp.size >= INT_MAX / num_possible_cpus())
-               return -ENOMEM;
        if (tmp.num_counters >= INT_MAX / sizeof(struct xt_counters))
                return -ENOMEM;
 
index e60c1b4..d3e884a 100644 (file)
@@ -1042,8 +1042,6 @@ do_replace(void __user *user, unsigned int len)
                return -EFAULT;
 
        /* overflow check */
-       if (tmp.size >= INT_MAX / num_possible_cpus())
-               return -ENOMEM;
        if (tmp.num_counters >= INT_MAX / sizeof(struct xt_counters))
                return -ENOMEM;