diff options
author | David S. Miller <davem@davemloft.net> | 2011-06-29 08:48:41 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-06-29 08:48:41 -0400 |
commit | 7ab24bfdf9a9a9f87ac8e5ad9a25f80b5b947be7 (patch) | |
tree | 897d12fb7498316d05ce2ed48722fc78b61fc4e1 /drivers/net/ppp_deflate.c | |
parent | ed6e4ef836d425bc35e33bf20fcec95e68203afa (diff) |
net+crypto: Use vmalloc for zlib inflate buffers.
They are 64K and result in order-4 allocations, even with SLUB.
Therefore, just like we always have for the deflate buffers, use
vmalloc.
Reported-by: Martin Jackson <mjackson220.list@gmail.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ppp_deflate.c')
-rw-r--r-- | drivers/net/ppp_deflate.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/ppp_deflate.c b/drivers/net/ppp_deflate.c index 31e9407a0739..1dbdf82a6dfd 100644 --- a/drivers/net/ppp_deflate.c +++ b/drivers/net/ppp_deflate.c | |||
@@ -305,7 +305,7 @@ static void z_decomp_free(void *arg) | |||
305 | 305 | ||
306 | if (state) { | 306 | if (state) { |
307 | zlib_inflateEnd(&state->strm); | 307 | zlib_inflateEnd(&state->strm); |
308 | kfree(state->strm.workspace); | 308 | vfree(state->strm.workspace); |
309 | kfree(state); | 309 | kfree(state); |
310 | } | 310 | } |
311 | } | 311 | } |
@@ -345,8 +345,7 @@ static void *z_decomp_alloc(unsigned char *options, int opt_len) | |||
345 | 345 | ||
346 | state->w_size = w_size; | 346 | state->w_size = w_size; |
347 | state->strm.next_out = NULL; | 347 | state->strm.next_out = NULL; |
348 | state->strm.workspace = kmalloc(zlib_inflate_workspacesize(), | 348 | state->strm.workspace = vmalloc(zlib_inflate_workspacesize()); |
349 | GFP_KERNEL|__GFP_REPEAT); | ||
350 | if (state->strm.workspace == NULL) | 349 | if (state->strm.workspace == NULL) |
351 | goto out_free; | 350 | goto out_free; |
352 | 351 | ||