aboutsummaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorTadeusz Struk <tadeusz.struk@intel.com>2014-05-19 12:51:33 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2014-05-22 09:03:18 -0400
commit9bac019dad8098a77cce555d929f678e22111783 (patch)
tree2a971b24ae290e12fa902923dce6732bcb11ab53 /crypto
parent51a716349946362dee27aa48b1987870cb69636b (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>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/testmgr.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/crypto/testmgr.c b/crypto/testmgr.c
index dc3cf3535ef0..75c78e6b1a26 100644
--- a/crypto/testmgr.c
+++ b/crypto/testmgr.c
@@ -414,16 +414,18 @@ static int __test_aead(struct crypto_aead *tfm, int enc,
414 void *input; 414 void *input;
415 void *output; 415 void *output;
416 void *assoc; 416 void *assoc;
417 char iv[MAX_IVLEN]; 417 char *iv;
418 char *xbuf[XBUFSIZE]; 418 char *xbuf[XBUFSIZE];
419 char *xoutbuf[XBUFSIZE]; 419 char *xoutbuf[XBUFSIZE];
420 char *axbuf[XBUFSIZE]; 420 char *axbuf[XBUFSIZE];
421 421
422 iv = kzalloc(MAX_IVLEN, GFP_KERNEL);
423 if (!iv)
424 return ret;
422 if (testmgr_alloc_buf(xbuf)) 425 if (testmgr_alloc_buf(xbuf))
423 goto out_noxbuf; 426 goto out_noxbuf;
424 if (testmgr_alloc_buf(axbuf)) 427 if (testmgr_alloc_buf(axbuf))
425 goto out_noaxbuf; 428 goto out_noaxbuf;
426
427 if (diff_dst && testmgr_alloc_buf(xoutbuf)) 429 if (diff_dst && testmgr_alloc_buf(xoutbuf))
428 goto out_nooutbuf; 430 goto out_nooutbuf;
429 431
@@ -767,6 +769,7 @@ out_nooutbuf:
767out_noaxbuf: 769out_noaxbuf:
768 testmgr_free_buf(xbuf); 770 testmgr_free_buf(xbuf);
769out_noxbuf: 771out_noxbuf:
772 kfree(iv);
770 return ret; 773 return ret;
771} 774}
772 775