From dc1f7b114b84cd54bc03c75c521c57cb79a30cfc Mon Sep 17 00:00:00 2001 From: Jozsef Kadlecsik Date: Fri, 29 Oct 2010 22:35:14 +0200 Subject: Fix gfp_flags at resizing Resizing functions are called without holding any lock. So we can allocate using the flag GFP_KERNEL. --- kernel/include/linux/netfilter/ip_set_chash.h | 4 ++-- kernel/ip_set.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'kernel') 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) -- cgit v1.2.3