In message: [linux-yocto][linux-yocto 
v5.10/standard/ti-sdk-5.4/ti-j72xx][PATCH] crypto: add timeout to 
crypto_wait_req
on 06/05/2021 Xulin Sun wrote:

> From: Tero Kristo <[email protected]>
> 
> commit 0ecd89ec64116669bcf7f7feae03a110cc2ad30c from
> git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git
> 
> Currently crypto_wait_req waits indefinitely for an async crypto request
> to complete. This is bad as it can cause for example the crypto test
> manager to hang without any notification as to why it has happened.
> Instead of waiting indefinitely, add a 1 second timeout to the call,
> and provide a warning print if a timeout happens.

merged.

Bruce

> 
> Signed-off-by: Tero Kristo <[email protected]>
> Signed-off-by: Xulin Sun <[email protected]>
> ---
>  include/linux/crypto.h | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/include/linux/crypto.h b/include/linux/crypto.h
> index 27576da1112e..f769adf9edd5 100644
> --- a/include/linux/crypto.h
> +++ b/include/linux/crypto.h
> @@ -593,7 +593,6 @@ static inline int crypto_wait_req(int err, struct 
> crypto_wait *wait)
>       switch (err) {
>       case -EINPROGRESS:
>       case -EBUSY:
> -             wait_for_completion(&wait->completion);
>               err = wait_for_completion_timeout(&wait->completion,
>                                                 msecs_to_jiffies(1000));
>               reinit_completion(&wait->completion);
> -- 
> 2.17.1
> 
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9845): 
https://lists.yoctoproject.org/g/linux-yocto/message/9845
Mute This Topic: https://lists.yoctoproject.org/mt/82625266/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to