[PATCH v11 11/22] crypto: amlogic - Introduce hasher

Herbert Xu herbert at gondor.apana.org.au
Sat Dec 21 03:37:55 PST 2024


On Fri, Dec 13, 2024 at 05:07:44PM +0300, Alexey Romanov wrote:
>
> +static int meson_sha_digest(struct ahash_request *req)
> +{
> +	struct crypto_wait wait;
> +	int ret;
> +
> +	crypto_init_wait(&wait);
> +	ahash_request_set_callback(req, CRYPTO_TFM_REQ_MAY_SLEEP |
> +					CRYPTO_TFM_REQ_MAY_BACKLOG,
> +					crypto_req_done, &wait);
> +
> +	meson_sha_init(req);
> +
> +	ret = crypto_wait_req(meson_sha_update(req), &wait);

You cannot sleep in the digest function.

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



More information about the linux-arm-kernel mailing list