From efa5651b57de7b243e9d2784c69062c3592c14c9 Mon Sep 17 00:00:00 2001 From: Joonwoo Park Date: Mon, 26 Nov 2007 23:23:21 +0800 Subject: [PATCH] --- yaml --- r: 78214 b: refs/heads/master c: dcaee95a1b396f85cdc28099f39710be328d3a5e h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/net/xfrm/xfrm_hash.c | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index cc2f4a20bfd0..dc01cb35985b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8512430e554a84275669f78f86dce18566d5cf7a +refs/heads/master: dcaee95a1b396f85cdc28099f39710be328d3a5e diff --git a/trunk/net/xfrm/xfrm_hash.c b/trunk/net/xfrm/xfrm_hash.c index 55ab5792af56..a2023ec52329 100644 --- a/trunk/net/xfrm/xfrm_hash.c +++ b/trunk/net/xfrm/xfrm_hash.c @@ -17,17 +17,14 @@ struct hlist_head *xfrm_hash_alloc(unsigned int sz) struct hlist_head *n; if (sz <= PAGE_SIZE) - n = kmalloc(sz, GFP_KERNEL); + n = kzalloc(sz, GFP_KERNEL); else if (hashdist) - n = __vmalloc(sz, GFP_KERNEL, PAGE_KERNEL); + n = __vmalloc(sz, GFP_KERNEL | __GFP_ZERO, PAGE_KERNEL); else n = (struct hlist_head *) - __get_free_pages(GFP_KERNEL | __GFP_NOWARN, + __get_free_pages(GFP_KERNEL | __GFP_NOWARN | __GFP_ZERO, get_order(sz)); - if (n) - memset(n, 0, sz); - return n; }