summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorXie Xiaobo <xiaobo.xie@nxp.com>2017-12-12 08:23:55 (GMT)
committerXie Xiaobo <xiaobo.xie@nxp.com>2017-12-12 08:23:55 (GMT)
commit708b8b8eb67124716c8579a9e259742b040d4dd3 (patch)
treeafc209d3f63c3d79e91a98c8f3ba01465977b574 /crypto
parentc0246a9ec4d461ef4dd7647f94005380bb9e7f0b (diff)
parent5fe8cfe356d2dbf6f9d7e213614d6be9ad0ac592 (diff)
downloadlinux-708b8b8eb67124716c8579a9e259742b040d4dd3.tar.xz
Merge branch 'linux-4.9-nxp' into linux-4.9 on Dec. 8, 2017
Signed-off-by: Xiaobo Xie <xiaobo.xie@nxp.com>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/testmgr.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/crypto/testmgr.c b/crypto/testmgr.c
index 73d91fb..e920ee0 100644
--- a/crypto/testmgr.c
+++ b/crypto/testmgr.c
@@ -1320,12 +1320,16 @@ static int __test_skcipher(struct crypto_skcipher *tfm, int enc,
const char *e, *d;
struct tcrypt_result result;
void *data;
- char iv[MAX_IVLEN];
+ char *iv;
char *xbuf[XBUFSIZE];
char *xoutbuf[XBUFSIZE];
int ret = -ENOMEM;
unsigned int ivsize = crypto_skcipher_ivsize(tfm);
+ iv = kmalloc(MAX_IVLEN, GFP_KERNEL);
+ if (!iv)
+ return ret;
+
if (testmgr_alloc_buf(xbuf))
goto out_nobuf;
@@ -1566,6 +1570,7 @@ out:
testmgr_free_buf(xoutbuf);
out_nooutbuf:
testmgr_free_buf(xbuf);
+ kfree(iv);
out_nobuf:
return ret;
}