[CRIU] [PATCH] pie: restorer -- Don't fail if no futex provided

Pavel Emelyanov xemul at parallels.com
Mon Apr 1 04:30:37 EDT 2013


On 03/28/2013 10:28 PM, Cyrill Gorcunov wrote:
> The image data may have no futex provided but we have
> no "optional" entry for that (because futex data is
> a part of thread_core_entry message).
> 
> Still we know that futex length can't be zero thus
> make it "optional" by a value -- if length is zero,
> we consider it as a sign to skip.
> 
> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> ---
>  pie/restorer.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/pie/restorer.c b/pie/restorer.c
> index 400dcb4..e4d65c5 100644
> --- a/pie/restorer.c
> +++ b/pie/restorer.c
> @@ -205,7 +205,7 @@ static int restore_thread_common(struct rt_sigframe *sigframe,
>  {
>  	sys_set_tid_address((int *)decode_pointer(args->clear_tid_addr));
>  
> -	if (args->has_futex) {
> +	if (args->has_futex && args->futex_rla_len) {
>  		int ret;
>  
>  		ret = sys_set_robust_list(decode_pointer(args->futex_rla),
> 


applied


More information about the CRIU mailing list