X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=net%2Fxfrm%2Fxfrm_hash.c;h=a2023ec52329ef66b95e14dc94f7086e5683e534;hb=a1b051405bc16222d92c73b0c26d65b333a154ee;hp=37643bb8768a83fe6bea2bb40a007cc2a78ee503;hpb=fecf3404f4aba6d0edeba31eeb018cbb6326dff2;p=powerpc.git diff --git a/net/xfrm/xfrm_hash.c b/net/xfrm/xfrm_hash.c index 37643bb876..a2023ec523 100644 --- a/net/xfrm/xfrm_hash.c +++ b/net/xfrm/xfrm_hash.c @@ -17,15 +17,13 @@ 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, get_order(sz)); - - if (n) - memset(n, 0, sz); + __get_free_pages(GFP_KERNEL | __GFP_NOWARN | __GFP_ZERO, + get_order(sz)); return n; }