[CRIU] [PATCH 17/37] restore: close PROC_FD_OFF before calling sigreturn

Pavel Emelyanov xemul at parallels.com
Fri Apr 18 08:31:19 PDT 2014


On 04/18/2014 06:42 PM, Andrey Vagin wrote:
> mntns_collect_root() uses PROC_FD_OFF, so we need to close it.
> 
> Signed-off-by: Andrey Vagin <avagin at openvz.org>
> ---
>  cr-restore.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/cr-restore.c b/cr-restore.c
> index c448752..c9b1fc2 100644
> --- a/cr-restore.c
> +++ b/cr-restore.c
> @@ -2617,6 +2617,7 @@ static int sigreturn_restore(pid_t pid, CoreEntry *core)
>  		goto err;
>  
>  	close_image_dir();
> +	close_service_fd(PROC_FD_OFF);
>  	close_service_fd(ROOT_FD_OFF);
>  
>  	__gcov_flush();
> 


We have it at the end of prepare_fds(). Why do we need new?


More information about the CRIU mailing list