[CRIU] [PATCH] zdtm: check that pending signals are handled after resuming processes

Pavel Emelyanov xemul at parallels.com
Mon Sep 23 07:25:28 EDT 2013


On 09/20/2013 08:28 PM, Andrey Vagin wrote:
> This patch detects the race, when a signal hanler could be executed
> during restore.
> More details are in: 5d18eca restorer: Block signals early
> 
> Signed-off-by: Andrey Vagin <avagin at openvz.org>
> ---
>  test/zdtm/live/static/sigpending.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/test/zdtm/live/static/sigpending.c b/test/zdtm/live/static/sigpending.c
> index 05471f9..c52f44a 100644
> --- a/test/zdtm/live/static/sigpending.c
> +++ b/test/zdtm/live/static/sigpending.c
> @@ -37,6 +37,11 @@ static void sig_handler(int signal, siginfo_t *info, void *data)
>  
>  	test_msg("signo=%d si_code=%x\n", signal, info->si_code);
>  
> +	if (test_go()) {
> +		err("The signal is received before unlocking");
> +		return;
> +	}
> +
>  	switch (signal) {
>  	case SIGCHLD:
>  		if ((info->si_code & CLD_EXITED) &&
> 


applied


More information about the CRIU mailing list