[CRIU] Re: [PATCH 3/4] pipes: Set fowners for both pipe ends

Pavel Emelyanov xemul at parallels.com
Thu Apr 12 06:31:39 EDT 2012


On 04/12/2012 02:29 PM, Cyrill Gorcunov wrote:
> On Thu, Apr 12, 2012 at 02:18:42PM +0400, Pavel Emelyanov wrote:
>> On 04/12/2012 01:45 PM, Cyrill Gorcunov wrote:
>>> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
>>> ---
>>>  pipes.c |    7 ++++---
>>>  1 files changed, 4 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/pipes.c b/pipes.c
>>> index 3ebad92..99672d1 100644
>>> --- a/pipes.c
>>> +++ b/pipes.c
>>> @@ -261,6 +261,10 @@ static int open_pipe(struct file_desc *d)
>>>  		return -1;
>>>  	}
>>>  
>>> +	if (restore_fown(pfd[0], &pi->pe.fown) ||
>>> +	    restore_fown(pfd[1], &pi->pe.fown))
>>> +		return -1;
>>> +
>>
>> No, this is wrong. The restore_fown for the other end should
>> occur in recv fn, since it reopens the struct file.
> 
> Updated below, use it instead of this patch.
> 
> 	Cyrill

OK, this one looks correct. Applied.


More information about the CRIU mailing list