On Wed, Oct 30, 2024 at 05:22:35PM +0100, Harald Freudenberger wrote: > > +static int s390_phmac_sha2_clone_tfm(struct crypto_shash *dst, > + struct crypto_shash *src) > +{ > + struct s390_phmac_ctx *dst_ctx = crypto_shash_ctx(dst); > + struct s390_phmac_ctx *src_ctx = crypto_shash_ctx(src); > + int rc; > + > + rc = s390_phmac_sha2_init_tfm(dst); > + if (rc) > + return rc; > + > + if (src_ctx->key && src_ctx->keylen) { > + dst_ctx->key = kmemdup(src_ctx->key, src_ctx->keylen, > + GFP_KERNEL); Any allocations in clone_tfm must be GFP_ATOMIC since this is supposed to be used on paths where we can't sleep (otherwise you could just allocate a new tfm). Cheers, -- Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt