[PATCH v2] crypto: AF_ALG - remove locking in async callback
Herbert Xu
herbert at gondor.apana.org.au
Fri Nov 10 03:10:58 PST 2017
On Tue, Nov 07, 2017 at 10:05:48AM +0100, Stephan Müller wrote:
>
> if (msg->msg_iocb && !is_sync_kiocb(msg->msg_iocb)) {
> /* AIO operation */
> + sock_hold(sk);
> areq->iocb = msg->msg_iocb;
> aead_request_set_callback(&areq->cra_u.aead_req,
> CRYPTO_TFM_REQ_MAY_BACKLOG,
> af_alg_async_cb, areq);
> err = ctx->enc ? crypto_aead_encrypt(&areq->cra_u.aead_req) :
> crypto_aead_decrypt(&areq->cra_u.aead_req);
> +
> + /* AIO operation in progress */
> + if (err == -EINPROGRESS) {
> + /* Remember output size that will be generated. */
> + areq->outlen = outlen;
> +
> + return -EIOCBQUEUED;
> + }
Since we're allowing backlogs, what about EBUSY?
Cheers,
--
Email: Herbert Xu <herbert at gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
More information about the linux-arm-kernel
mailing list