lkml.org 
[lkml]   [2022]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] crypto: sahara - don't sleep when in softirq
On Wed, Jul 13, 2022 at 11:35:50AM +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. This patch is not yet tested.
>
> Fixes: c0c3c89ae347 ("crypto: sahara - replace tasklets with kthread")
> Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
> ---
> drivers/crypto/sahara.c | 17 ++++++++---------
> 1 file changed, 8 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/crypto/sahara.c b/drivers/crypto/sahara.c
> index 457084b344c1..867107b4ed30 100644
> --- a/drivers/crypto/sahara.c
> +++ b/drivers/crypto/sahara.c
> @@ -26,7 +26,6 @@
> #include <linux/kernel.h>
> #include <linux/kthread.h>
> #include <linux/module.h>
> -#include <linux/mutex.h>

Shouldn't this be replaced with spinlock.h?

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

\
 
 \ /
  Last update: 2022-07-22 10:19    [W:0.024 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site