diff options
author | Tadeusz Struk <tadeusz.struk@intel.com> | 2014-05-19 09:51:33 -0700 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2015-04-14 14:00:22 -0500 |
commit | 5a4802bd7c4a7a01003332ae2977e203316619bb (patch) | |
tree | 5cd68de9afeb6ef565ba2ec5b816eb2f9d2263cb /crypto | |
parent | dd276519cd272ba52d8620aa14a7a2c88750bf5c (diff) |
crypto: testmgr - Fix DMA-API warning
With DMA-API debug enabled testmgr triggers a "DMA-API: device driver maps memory from stack" warning, when tested on a crypto HW accelerator.
Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 9bac019dad8098a77cce555d929f678e22111783)
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/testmgr.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/crypto/testmgr.c b/crypto/testmgr.c index 77955507f6f1..5945bb9fc76d 100644 --- a/crypto/testmgr.c +++ b/crypto/testmgr.c @@ -414,16 +414,18 @@ static int __test_aead(struct crypto_aead *tfm, int enc, void *input; void *output; void *assoc; - char iv[MAX_IVLEN]; + char *iv; char *xbuf[XBUFSIZE]; char *xoutbuf[XBUFSIZE]; char *axbuf[XBUFSIZE]; + iv = kzalloc(MAX_IVLEN, GFP_KERNEL); + if (!iv) + return ret; if (testmgr_alloc_buf(xbuf)) goto out_noxbuf; if (testmgr_alloc_buf(axbuf)) goto out_noaxbuf; - if (diff_dst && testmgr_alloc_buf(xoutbuf)) goto out_nooutbuf; @@ -767,6 +769,7 @@ out_nooutbuf: out_noaxbuf: testmgr_free_buf(xbuf); out_noxbuf: + kfree(iv); return ret; } |