Re: [PATCH linux-evl] evl/latmus: handle ERESTARTSYS from evl_wait_flag()

Philippe Gerum <[email protected]>
Newsgroups dev.linux.lists.xenomai
Message-ID <[email protected]>
Tobias Schaffner <[email protected]> writes:

> evl_sleep_schedule() returns -ERESTARTSYS when an EVL thread is kicked
> due to a pending Linux signal (e.g. SIGALRM from the -T timeout).
> run_measurement() only checked for -EINTR, causing the histogram data
> to be discarded instead of copied to userspace on timed runs.
>
> Fixes: 6f1edfe3b73e ("evl/syscall: fix restartable syscall handling")
>
> Signed-off-by: Tobias Schaffner <[email protected]>
> ---
>  drivers/evl/latmus.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/evl/latmus.c b/drivers/evl/latmus.c
> index 0303e21d066b..9a0295044443 100644
> --- a/drivers/evl/latmus.c
> +++ b/drivers/evl/latmus.c
> @@ -970,7 +970,7 @@ static int run_measurement(struct latmus_runner *runner,
>  		return -EFAULT;
>  
>  	ret = measure_continously(runner);
> -	if (ret != -EINTR)
> +	if (ret != -EINTR && ret != -ERESTARTSYS)
>  		return ret;
>  
>  	/*

Merged, thanks.

-- 
Philippe.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.