Re: [PATCH v3] crypto: Fix hungtask for PADATA_RESET

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 04, 2023 at 01:33:41PM +0000, Lu Jialin wrote:
> ---
>  crypto/pcrypt.c | 4 ++++
>  kernel/padata.c | 2 +-
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/crypto/pcrypt.c b/crypto/pcrypt.c
> index 8c1d0ca41213..d0d954fe9d54 100644
> --- a/crypto/pcrypt.c
> +++ b/crypto/pcrypt.c
> @@ -117,6 +117,8 @@ static int pcrypt_aead_encrypt(struct aead_request *req)
>  	err = padata_do_parallel(ictx->psenc, padata, &ctx->cb_cpu);
>  	if (!err)
>  		return -EINPROGRESS;
> +	if (err == -EBUSY)
> +		return -EAGAIN;
>  
>  	return err;
>  }
> @@ -164,6 +166,8 @@ static int pcrypt_aead_decrypt(struct aead_request *req)
>  	err = padata_do_parallel(ictx->psdec, padata, &ctx->cb_cpu);
>  	if (!err)
>  		return -EINPROGRESS;
> +	if (err == -EBUSY)
> +		return -EAGAIN;
>  
>  	return err;
>  }
> diff --git a/kernel/padata.c b/kernel/padata.c
> index 222d60195de6..81c8183f3176 100644
> --- a/kernel/padata.c
> +++ b/kernel/padata.c
> @@ -202,7 +202,7 @@ int padata_do_parallel(struct padata_shell *ps,
>  		*cb_cpu = cpu;
>  	}
>  
> -	err =  -EBUSY;
> +	err = -EBUSY;

Why not just returning -EAGAIN here directly?




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux