]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv4/netfilter/arp_tables.c
[NETFILTER]: x_tables: struct xt_table_info diet
[linux-2.6-omap-h63xx.git] / net / ipv4 / netfilter / arp_tables.c
index 2909c92ecd999b22fc8001d501db48e4882d0eba..a21722d5c9fa44736e99351625a2617f2060c293 100644 (file)
@@ -811,8 +811,7 @@ static int do_replace(void __user *user, unsigned int len)
                return -ENOPROTOOPT;
 
        /* overflow check */
-       if (tmp.size >= (INT_MAX - sizeof(struct xt_table_info)) / NR_CPUS -
-                       SMP_CACHE_BYTES)
+       if (tmp.size >= INT_MAX / num_possible_cpus())
                return -ENOMEM;
        if (tmp.num_counters >= INT_MAX / sizeof(struct xt_counters))
                return -ENOMEM;
@@ -1090,7 +1089,7 @@ int arpt_register_table(struct arpt_table *table,
 {
        int ret;
        struct xt_table_info *newinfo;
-       static struct xt_table_info bootstrap
+       struct xt_table_info bootstrap
                = { 0, 0, 0, { 0 }, { 0 }, { } };
        void *loc_cpu_entry;