Re: [PATCH v2] crypto: AF_ALG - race-free access of encryption flag

From: Herbert Xu
Date: Wed Nov 29 2017 - 07:17:57 EST


On Wed, Nov 29, 2017 at 12:05:13PM +0100, Stephan Müller wrote:
>
> Shouldn't we then create a patch for the pre-4.14 algif_skcipher code that
> moves the wait out of the while loop to the beginning of the function in
> recvmsg?

When I said dead-lock I just meant that the recvmsg will block
indefinitely. It can still be interrupted from user-space.

As the behaviour is currently undefined anyway, I don't think we
need to backport this fix. At least not until we maintain a list
of ctx->enc like we discussed.

Cheers,
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt