summaryrefslogtreecommitdiff
path: root/crypto/lzo.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2014-09-14 15:34:38 +0200
committerThomas Gleixner <tglx@linutronix.de>2014-09-14 15:35:36 +0200
commitcd796018668d3f3f088c756a3b1a7f4f266a4e4b (patch)
tree621e49aa88ee2609689d7726b54d6524d9445442 /crypto/lzo.c
parent9b40a3dd3d4e3ff9904e049f6794c972b603272f (diff)
parent245c531351ef282b69bcd2bd7d46bfc79234f9b4 (diff)
downloadlinux-crypto-cd796018668d3f3f088c756a3b1a7f4f266a4e4b.tar.gz
linux-crypto-cd796018668d3f3f088c756a3b1a7f4f266a4e4b.zip
Merge tag 'irqchip-core-3.18' of git://git.infradead.org/users/jcooper/linux into irq/core
irqchip core changes for v3.18 - renesas: suspend to RAM, runtime PM, cleanups and DT binding docs - keystone: add new driver - hip04: add Hisilicon HiP04 driver (without touching irq-gic.c) - gic: Use defines instead of magic number, preserve v2 bybass bits - handle_domain_irq: common low level interrupt entry handler
Diffstat (limited to 'crypto/lzo.c')
-rw-r--r--crypto/lzo.c8
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,