diff options
author | James Morris <james.l.morris@oracle.com> | 2014-11-19 21:32:12 +1100 |
---|---|---|
committer | James Morris <james.l.morris@oracle.com> | 2014-11-19 21:32:12 +1100 |
commit | bbd9976dcd5d35e4314b9c147047b341eb7cc236 (patch) | |
tree | 0e60a217b70cdfd62d7b8c1d9935a80223f80dec /crypto/lzo.c | |
parent | 6dde07d9334a97ed066bd8f4f7748cbd5f4b8231 (diff) | |
parent | b9e89cef449430b7dcdc79fccb245fed20d2692d (diff) | |
download | linux-crypto-bbd9976dcd5d35e4314b9c147047b341eb7cc236.tar.gz linux-crypto-bbd9976dcd5d35e4314b9c147047b341eb7cc236.zip |
Merge commit 'v3.17' into next
Diffstat (limited to 'crypto/lzo.c')
-rw-r--r-- | crypto/lzo.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/crypto/lzo.c b/crypto/lzo.c index 1c2aa69c..a8ff2f77 100644 --- a/crypto/lzo.c +++ b/crypto/lzo.c @@ -20,6 +20,7 @@ #include <linux/module.h> #include <linux/crypto.h> #include <linux/vmalloc.h> +#include <linux/mm.h> #include <linux/lzo.h> struct lzo_ctx { @@ -30,7 +31,10 @@ static int lzo_init(struct crypto_tfm *tfm) { struct lzo_ctx *ctx = crypto_tfm_ctx(tfm); - ctx->lzo_comp_mem = vmalloc(LZO1X_MEM_COMPRESS); + ctx->lzo_comp_mem = kmalloc(LZO1X_MEM_COMPRESS, + GFP_KERNEL | __GFP_NOWARN | __GFP_REPEAT); + if (!ctx->lzo_comp_mem) + ctx->lzo_comp_mem = vmalloc(LZO1X_MEM_COMPRESS); if (!ctx->lzo_comp_mem) return -ENOMEM; @@ -41,7 +45,7 @@ static void lzo_exit(struct crypto_tfm *tfm) { struct lzo_ctx *ctx = crypto_tfm_ctx(tfm); - vfree(ctx->lzo_comp_mem); + kvfree(ctx->lzo_comp_mem); } static int lzo_compress(struct crypto_tfm *tfm, const u8 *src, |