[CRIU] Re: [PATCH 1/3] unix: allow to dump closed sockets

Pavel Emelyanov xemul at parallels.com
Thu Nov 1 10:37:10 EDT 2012


On 11/01/2012 05:32 PM, Andrey Vagin wrote:
> Looks like it can be restored already.
> 
> https://bugzilla.openvz.org/show_bug.cgi?id=2408
> 
> Signed-off-by: Andrey Vagin <avagin at openvz.org>
> ---
>  sk-unix.c | 7 -------
>  1 file changed, 7 deletions(-)
> 
> diff --git a/sk-unix.c b/sk-unix.c
> index 2003600..2c0e8fc 100644
> --- a/sk-unix.c
> +++ b/sk-unix.c
> @@ -92,15 +92,8 @@ static int can_dump_unix_sk(const struct unix_sk_desc *sk)
>  
>  	switch (sk->state) {
>  	case TCP_LISTEN:
> -		break;
>  	case TCP_ESTABLISHED:
> -		break;
>  	case TCP_CLOSE:
> -		if (sk->type != SOCK_DGRAM) {
> -			pr_err("Unexpected state %d on type %d\n",
> -				sk->state, sk->type);
> -			return 0;
> -		}

That's not enough. The open_unixsk_standalone will not restore file params
and socket options for such socket. An we do need test for that.

>  		break;
>  	default:
>  		pr_err("Unknown state %d\n", sk->state);
> 




More information about the CRIU mailing list