summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2010-10-29 22:35:14 +0200
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2010-10-29 22:35:14 +0200
commitdc1f7b114b84cd54bc03c75c521c57cb79a30cfc (patch)
tree13649589bfc4a95d7a83bc9dafa94886edf3bfa9 /kernel
parentf484d856492fb66a6b658f4b753a64d7c151b5fd (diff)
Fix gfp_flags at resizing
Resizing functions are called without holding any lock. So we can allocate using the flag GFP_KERNEL.
Diffstat (limited to 'kernel')
-rw-r--r--kernel/include/linux/netfilter/ip_set_chash.h4
-rw-r--r--kernel/ip_set.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/kernel/include/linux/netfilter/ip_set_chash.h b/kernel/include/linux/netfilter/ip_set_chash.h
index 9a1e26c..f0ef580 100644
--- a/kernel/include/linux/netfilter/ip_set_chash.h
+++ b/kernel/include/linux/netfilter/ip_set_chash.h
@@ -338,7 +338,7 @@ retry:
/* In case we have plenty of memory :-) */
return -IPSET_ERR_HASH_FULL;
t = ip_set_alloc(jhash_size(htable_bits) * sizeof(struct slist),
- gfp_flags);
+ GFP_KERNEL);
if (!t)
return -ENOMEM;
@@ -809,7 +809,7 @@ retry:
/* In case we have plenty of memory :-) */
return -IPSET_ERR_HASH_FULL;
t = ip_set_alloc(jhash_size(htable_bits) * sizeof(struct slist),
- gfp_flags);
+ GFP_KERNEL);
if (!t)
return -ENOMEM;
diff --git a/kernel/ip_set.c b/kernel/ip_set.c
index a1813e2..5e91d50 100644
--- a/kernel/ip_set.c
+++ b/kernel/ip_set.c
@@ -257,7 +257,7 @@ retry:
ret = set->variant->kadt(set, skb, IPSET_ADD, family, dim, flags);
write_unlock_bh(&set->lock);
- /* Retry function must be called without holding any lock */
+ /* Resize function must be called without holding any lock */
if (ret == -EAGAIN
&& set->variant->resize
&& (ret = set->variant->resize(set, GFP_ATOMIC, retried++)) == 0)