On Wed, Nov 13, 2019 at 11:55:22AM +0100, Harald Freudenberger wrote: > > @@ -129,6 +128,7 @@ static int ecb_paes_init(struct crypto_skcipher *tfm) > struct s390_paes_ctx *ctx = crypto_skcipher_ctx(tfm); > > ctx->kb.key = NULL; > + spin_lock_init(&ctx->pk_lock); This makes no sense. The context is per-tfm, and each tfm should have a single key at any time. The synchronisation of setkey vs. crypto operations is left to the user of the tfm, not the implementor. So why do you need this spin lock at all? Cheers, -- Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt