1
0
Fork 0

MLK-23620-1 security/keys/secure_key: update the check for the return code of caam_jr_enqueue function

In commit 4d370a1036 ("crypto: caam - change return code in caam_jr_enqueue function"),
the return code of caam_jr_enqueue function was changed
from 0 to -EINPROGRESS, in case of success, -ENOSPC in case
the CAAM is busy (has no space left in job ring queue),
-EIO if it cannot map the caller's descriptor.

Update the case for wait_for_completion in sk_job_submit
based on the new return code from caam_jr_enqueue function.

Fixes: 4d370a1036 ("crypto: caam - change return code in caam_jr_enqueue function")
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
5.4-rM2-2.2.x-imx-squashed
Iuliana Prodan 2020-03-13 16:34:32 +02:00
parent 3a6947d9cc
commit 4031641e56
1 changed files with 1 additions and 1 deletions

View File

@ -393,7 +393,7 @@ static int sk_job_submit(struct device *jrdev, struct sk_req *req)
/* caam_jr_enqueue function for Enqueue a job descriptor */
ret = caam_jr_enqueue(jrdev, req->hwdesc, caam_op_done, req);
if (!ret)
if (ret == -EINPROGRESS)
wait_for_completion_interruptible(&req->comp);
ret = req->ret;