Loading drivers/crypto/msm/qcedev.c +15 −7 Original line number Diff line number Diff line /* Qualcomm CE device driver. * * Copyright (c) 2010-2017, The Linux Foundation. All rights reserved. * Copyright (c) 2010-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -843,6 +843,7 @@ static int qcedev_sha_final(struct qcedev_async_req *qcedev_areq, memset(&handle->sha_ctxt.trailing_buf[0], 0, 64); kzfree(k_buf_src); qcedev_areq->sha_req.sreq.src = NULL; return err; } Loading Loading @@ -1012,6 +1013,7 @@ static int qcedev_hmac_get_ohash(struct qcedev_async_req *qcedev_areq, handle->sha_ctxt.first_blk = 0; kzfree(k_src); qcedev_areq->sha_req.sreq.src = NULL; return err; } Loading Loading @@ -1166,8 +1168,10 @@ static int qcedev_vbuf_ablk_cipher_max_xfer(struct qcedev_async_req *areq, if (err == 0 && copy_to_user( (void __user *)creq->vbuf.dst[dst_i].vaddr, (k_align_dst + byteoffset), creq->vbuf.dst[dst_i].len)) return -EFAULT; creq->vbuf.dst[dst_i].len)) { err = -EFAULT; goto exit; } k_align_dst += creq->vbuf.dst[dst_i].len + byteoffset; Loading @@ -1177,8 +1181,10 @@ static int qcedev_vbuf_ablk_cipher_max_xfer(struct qcedev_async_req *areq, if (err == 0 && copy_to_user( (void __user *)creq->vbuf.dst[dst_i].vaddr, (k_align_dst + byteoffset), creq->data_len)) return -EFAULT; creq->data_len)) { err = -EFAULT; goto exit; } k_align_dst += creq->data_len; creq->vbuf.dst[dst_i].len -= creq->data_len; Loading @@ -1187,7 +1193,9 @@ static int qcedev_vbuf_ablk_cipher_max_xfer(struct qcedev_async_req *areq, } } *di = dst_i; exit: areq->cipher_req.creq.src = NULL; areq->cipher_req.creq.dst = NULL; return err; }; Loading drivers/crypto/msm/qcrypto.c +2 −2 Original line number Diff line number Diff line /* Qualcomm Crypto driver * * Copyright (c) 2010-2017, The Linux Foundation. All rights reserved. * Copyright (c) 2010-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -3923,7 +3923,7 @@ static int _sha_hmac_setkey(struct crypto_ahash *tfm, const u8 *key, struct qcrypto_sha_ctx *sha_ctx = crypto_tfm_ctx(&tfm->base); uint8_t *in_buf; int ret = 0; struct scatterlist sg; struct scatterlist sg = {0}; struct ahash_request *ahash_req; struct completion ahash_req_complete; Loading Loading
drivers/crypto/msm/qcedev.c +15 −7 Original line number Diff line number Diff line /* Qualcomm CE device driver. * * Copyright (c) 2010-2017, The Linux Foundation. All rights reserved. * Copyright (c) 2010-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -843,6 +843,7 @@ static int qcedev_sha_final(struct qcedev_async_req *qcedev_areq, memset(&handle->sha_ctxt.trailing_buf[0], 0, 64); kzfree(k_buf_src); qcedev_areq->sha_req.sreq.src = NULL; return err; } Loading Loading @@ -1012,6 +1013,7 @@ static int qcedev_hmac_get_ohash(struct qcedev_async_req *qcedev_areq, handle->sha_ctxt.first_blk = 0; kzfree(k_src); qcedev_areq->sha_req.sreq.src = NULL; return err; } Loading Loading @@ -1166,8 +1168,10 @@ static int qcedev_vbuf_ablk_cipher_max_xfer(struct qcedev_async_req *areq, if (err == 0 && copy_to_user( (void __user *)creq->vbuf.dst[dst_i].vaddr, (k_align_dst + byteoffset), creq->vbuf.dst[dst_i].len)) return -EFAULT; creq->vbuf.dst[dst_i].len)) { err = -EFAULT; goto exit; } k_align_dst += creq->vbuf.dst[dst_i].len + byteoffset; Loading @@ -1177,8 +1181,10 @@ static int qcedev_vbuf_ablk_cipher_max_xfer(struct qcedev_async_req *areq, if (err == 0 && copy_to_user( (void __user *)creq->vbuf.dst[dst_i].vaddr, (k_align_dst + byteoffset), creq->data_len)) return -EFAULT; creq->data_len)) { err = -EFAULT; goto exit; } k_align_dst += creq->data_len; creq->vbuf.dst[dst_i].len -= creq->data_len; Loading @@ -1187,7 +1193,9 @@ static int qcedev_vbuf_ablk_cipher_max_xfer(struct qcedev_async_req *areq, } } *di = dst_i; exit: areq->cipher_req.creq.src = NULL; areq->cipher_req.creq.dst = NULL; return err; }; Loading
drivers/crypto/msm/qcrypto.c +2 −2 Original line number Diff line number Diff line /* Qualcomm Crypto driver * * Copyright (c) 2010-2017, The Linux Foundation. All rights reserved. * Copyright (c) 2010-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -3923,7 +3923,7 @@ static int _sha_hmac_setkey(struct crypto_ahash *tfm, const u8 *key, struct qcrypto_sha_ctx *sha_ctx = crypto_tfm_ctx(&tfm->base); uint8_t *in_buf; int ret = 0; struct scatterlist sg; struct scatterlist sg = {0}; struct ahash_request *ahash_req; struct completion ahash_req_complete; Loading