[CRIU] [PATCH] tcp: disable the repair mode only for sockets of a current process

Pavel Emelyanov xemul at parallels.com
Wed Jul 15 04:00:10 PDT 2015


On 07/15/2015 01:54 PM, Andrey Vagin wrote:
> rst_tcp_repair_sockets is filled when all sockets are collected,
> but the repair mode should be disabled only for sockets which
> are restored in a current process.
> 
> https://bugzilla.openvz.org/show_bug.cgi?id=3281
> 
> Fixes: 73e303c8e265 ('rst: Fix rst_tcp_sock memory management')
> Signed-off-by: Andrey Vagin <avagin at openvz.org>
> ---
>  sk-tcp.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/sk-tcp.c b/sk-tcp.c
> index 2b8e278..fd0b4eb 100644
> --- a/sk-tcp.c
> +++ b/sk-tcp.c
> @@ -665,6 +665,9 @@ int rst_tcp_socks_prep(void)
>  	list_for_each_entry(ii, &rst_tcp_repair_sockets, rlist) {
>  		struct rst_tcp_sock *rs;
>  

This line should be preceded with a comment why this can happen
at all. Thanks :)

> +		if (ii->sk_fd == -1)
> +			continue;
> +
>  		rs = rst_mem_alloc(sizeof(*rs), RM_PRIVATE);
>  		if (!rs)
>  			return -1;
> 



More information about the CRIU mailing list