On Tue, Nov 07, 2017 at 07:19:32AM +0100, Stephan Müller wrote: > > Where I am not fully sure is whether af_alg_async_cb is called in any case. > I.e. when we invoke an AIO operation with a cipher that completes > synchronously (e.g. AES-NI), is this callback triggered? It's the same with any other callback in the crypto API. The completion function is called if the return value is EINPROGRESS or EBUSY. In fact the algif_aead/algif_skcipher code already frees the SG lists and areq on a sync return. So perhaps you can merge this with the completion function. Cheers, -- Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt