On Fri, Feb 17, 2017 at 11:31:41PM +0100, Stephan Müller wrote: > > + } else { > + /* Synchronous operation */ > + skcipher_request_set_callback(&areq->req, > + CRYPTO_TFM_REQ_MAY_SLEEP | > + CRYPTO_TFM_REQ_MAY_BACKLOG, > + af_alg_complete, > + &ctx->completion); > + err = af_alg_wait_for_completion(ctx->enc ? > + crypto_skcipher_encrypt(&areq->req) : > + crypto_skcipher_decrypt(&areq->req), > + &ctx->completion); > + } This is now outside of the loop for the sync case. The purpose of the loop in the sync case was to segment the data when we get a very large SG list that does not fit inside a single call. Or did I miss something? Overall I like this patch. Thanks, -- Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt