Skip to content

Commit 74fd74e

Browse files
panguptagregkh
authored andcommitted
crypto: caam - fixed handling of sg list
commit 42e95d1 upstream. when the source sg contains more than 1 fragment and destination sg contains 1 fragment, the caam driver mishandle the buffers to be sent to caam. Fixes: f2147b8 ("crypto: caam - Convert GCM to new AEAD interface") Cc: <stable@vger.kernel.org> # 4.2+ Signed-off-by: Pankaj Gupta <pankaj.gupta@nxp.com> Signed-off-by: Arun Pathak <arun.pathak@nxp.com> Reviewed-by: Horia Geanta <horia.geanta@nxp.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent ce36d9f commit 74fd74e

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎drivers/crypto/caam/caamalg.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,6 +1005,7 @@ static void init_aead_job(struct aead_request *req,
10051005
if (unlikely(req->src != req->dst)) {
10061006
if (edesc->dst_nents == 1) {
10071007
dst_dma = sg_dma_address(req->dst);
1008+
out_options = 0;
10081009
} else {
10091010
dst_dma = edesc->sec4_sg_dma +
10101011
sec4_sg_index *

0 commit comments

Comments
 (0)