[CRIU] [PATCH] restore: die properly if restore_one_task fails

Pavel Emelyanov xemul at parallels.com
Fri Aug 29 08:35:27 PDT 2014


On 08/29/2014 07:06 PM, Andrew Vagin wrote:
> On Fri, Aug 29, 2014 at 08:58:39AM -0500, Tycho Andersen wrote:
>> On Fri, Aug 29, 2014 at 04:46:00PM +0400, Pavel Emelyanov wrote:
>>> On 08/28/2014 10:14 PM, Tycho Andersen wrote:
>>>> This is really just the last bit of c32046c9; if restore_one_task() fails, we
>>>> need to do the same futex wakeup we do everywhere else in this function.
>>>>
>>>> Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
>>>> ---
>>>>  cr-restore.c | 5 ++++-
>>>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/cr-restore.c b/cr-restore.c
>>>> index cefa78e..ec4b648 100644
>>>> --- a/cr-restore.c
>>>> +++ b/cr-restore.c
>>>> @@ -1467,7 +1467,10 @@ static int restore_task_with_children(void *_arg)
>>>>  	if (current->parent == NULL && fini_mnt_ns())
>>>>  		goto err_fini_mnt;
>>>>  
>>>> -	return restore_one_task(current->pid.virt, ca->core);
>>>> +	if (restore_one_task(current->pid.virt, ca->core))
>>>> +		goto err_fini_mnt;
>>>
>>> The fini_mnt, that will be called on err_fini_mnt laber, is called one 
>>> function above. Shouldn't this be "goto err" instead?
>>
>> Yes. The one above it should probably not be err_fini_mnt either for
>> that matter, since that's what just failed.
> 
> I missed this too. Thanks.
> 
> Acked-by: Andrew Vagin <avagin at parallels.com>

Applied, thanks!



More information about the CRIU mailing list