Re: [PATCH 11/12] crypto: caam - add crypto_engine support for RSA algorithms

From: Horia Geanta
Date: Thu Nov 21 2019 - 11:53:59 EST


On 11/18/2019 12:31 AM, Iuliana Prodan wrote:
> @@ -311,14 +329,16 @@ static struct rsa_edesc *rsa_edesc_alloc(struct akcipher_request *req,
> edesc->src_nents = src_nents;
> edesc->dst_nents = dst_nents;
>
> + edesc->jrentry.base = &req->base;
> +
> + req_ctx->edesc = edesc;
> +
> if (!sec4_sg_bytes)
> return edesc;
>
> edesc->mapped_src_nents = mapped_src_nents;
> edesc->mapped_dst_nents = mapped_dst_nents;
>
> - edesc->jrentry.base = &req->base;
> -
This is a bug fix - edesc->jrentry.base must be set earlier,
before having the chance to return from the function (in case no S/G table
needs to be generated).

It should be squashed into
[PATCH 07/12] crypto: caam - refactor caam_jr_enqueue

Horia