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

Pavel Emelyanov xemul at parallels.com
Mon Apr 21 02:06:08 PDT 2014


On 04/18/2014 10:42 PM, Andrew Vagin wrote:
> On Fri, Apr 18, 2014 at 07:31:19PM +0400, Pavel Emelyanov wrote:
>> 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?
> open_vmas
> 	get_filemap_fd
> 		open_path

My question is -- why we have two? Should we leave only one?

> .
> 




More information about the CRIU mailing list