]> granicus.if.org Git - ipset/commitdiff
Fix wrong kzalloc flag in type_pf_expire
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Thu, 20 Jan 2011 17:55:48 +0000 (18:55 +0100)
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Thu, 20 Jan 2011 17:55:48 +0000 (18:55 +0100)
The expire functions of the hash types are called while locked, so
kzalloc must be called with GFP_ATOMIC.

kernel/include/linux/netfilter/ipset/ip_set_ahash.h

index 621e119b817b82f5a786f1e67d722864faf7356e..05855a7880a6880fe5cf00a07167d352055a761a 100644 (file)
@@ -701,7 +701,7 @@ type_pf_expire(struct ip_set_hash *h)
                if (n->pos + AHASH_INIT_SIZE < n->size) {
                        void *tmp = kzalloc((n->size - AHASH_INIT_SIZE)
                                            * sizeof(struct type_pf_telem),
-                                           GFP_KERNEL);
+                                           GFP_ATOMIC);
                        if (!tmp)
                                /* Still try to delete expired elements */
                                continue;