]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - net/netfilter/xt_hashlimit.c
Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[linux.git] / net / netfilter / xt_hashlimit.c
index 1ad4017f9b7349849d845c9e5bb9a5592533a291..8d86e39d6280a6112ca37ecd1732da70819b1f98 100644 (file)
@@ -260,7 +260,7 @@ static inline void
 dsthash_free(struct xt_hashlimit_htable *ht, struct dsthash_ent *ent)
 {
        hlist_del_rcu(&ent->node);
-       call_rcu_bh(&ent->rcu, dsthash_free_rcu);
+       call_rcu(&ent->rcu, dsthash_free_rcu);
        ht->count--;
 }
 static void htable_gc(struct work_struct *work);
@@ -274,14 +274,15 @@ static int htable_create(struct net *net, struct hashlimit_cfg3 *cfg,
        struct xt_hashlimit_htable *hinfo;
        const struct seq_operations *ops;
        unsigned int size, i;
+       unsigned long nr_pages = totalram_pages();
        int ret;
 
        if (cfg->size) {
                size = cfg->size;
        } else {
-               size = (totalram_pages << PAGE_SHIFT) / 16384 /
+               size = (nr_pages << PAGE_SHIFT) / 16384 /
                       sizeof(struct hlist_head);
-               if (totalram_pages > 1024 * 1024 * 1024 / PAGE_SIZE)
+               if (nr_pages > 1024 * 1024 * 1024 / PAGE_SIZE)
                        size = 8192;
                if (size < 16)
                        size = 16;
@@ -1326,7 +1327,7 @@ static void __exit hashlimit_mt_exit(void)
        xt_unregister_matches(hashlimit_mt_reg, ARRAY_SIZE(hashlimit_mt_reg));
        unregister_pernet_subsys(&hashlimit_net_ops);
 
-       rcu_barrier_bh();
+       rcu_barrier();
        kmem_cache_destroy(hashlimit_cachep);
 }