Re: [PATCH v2] crypto: sahara - don't sleep when in softirq
From: Herbert Xu
Date: Sun Jul 24 2022 - 21:57:23 EST
On Mon, Jul 25, 2022 at 09:13:24AM +0800, Zhengchao Shao wrote:
> Function of sahara_aes_crypt maybe could be called by function
> of crypto_skcipher_encrypt during the rx softirq, so it is not
> allowed to use mutex lock.
>
> Signed-off-by: Zhengchao Shao <shaozhengchao@xxxxxxxxxx>
> ---
> This patch is not yet tested, compiled only.
> ---
> drivers/crypto/sahara.c | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/crypto/sahara.c b/drivers/crypto/sahara.c
> index 457084b344c1..c978d16dc609 100644
> --- a/drivers/crypto/sahara.c
> +++ b/drivers/crypto/sahara.c
> @@ -26,7 +26,7 @@
> #include <linux/kernel.h>
> #include <linux/kthread.h>
> #include <linux/module.h>
> -#include <linux/mutex.h>
> +#include <linux/spinlock.h>
> #include <linux/of.h>
> #include <linux/of_device.h>
> #include <linux/platform_device.h>
Please keep the alphabetical order.
Thanks,
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt