Skip to contentSkip to conversation

netfilter: use vzalloc()

PATCH New Eric Dumazet 1 participant 1 message Nov 20, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 netfilter: use vzalloc()

nf_ct_alloc_hashtable() can use vzalloc()

---
 net/netfilter/nf_conntrack_core.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
net/netfilter/nf_conntrack_core.c +1 -2
index 0ba7d48..57a60c6 100644
@@ -1313,8 +1313,7 @@ void *nf_ct_alloc_hashtable(unsigned int *sizep, int *vmalloced, int nulls)
 	if (!hash) {
 		*vmalloced = 1;
 		printk(KERN_WARNING "nf_conntrack: falling back to vmalloc.\n");
-		hash = __vmalloc(sz, GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO,
-				 PAGE_KERNEL);
+		hash = vzalloc(sz);
 	}
 
 	if (hash && nulls)