[CRIU] [PATCH 08/12] parasite: Initialize tid_state_s::id on parasite bootstrap

Pavel Emelyanov xemul at parallels.com
Fri Mar 1 14:46:44 EST 2013


On 03/01/2013 11:36 PM, Cyrill Gorcunov wrote:
> On Fri, Mar 01, 2013 at 10:53:04PM +0400, Pavel Emelyanov wrote:
>> On 02/28/2013 07:35 PM, Cyrill Gorcunov wrote:
>>>
>>> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
>>> ---
>>>  include/parasite.h | 1 +
>>>  parasite-syscall.c | 6 ++++++
>>>  pie/parasite.c     | 7 ++++---
>>>  3 files changed, 11 insertions(+), 3 deletions(-)
>>>
>>
>>
>>> int parasite_init_threads_seized(struct parasite_ctl *ctl, struct pstree_item *item)
>>>  {
>>> +	struct parasite_init_args *args;
>>>  	int ret = 0, i;
>>>  
>>> +	args = parasite_args(ctl, struct parasite_init_args);
>>> +	memzero(args, sizeof(*args));
>>
>> What for? (a hint -- "not to shit pants by chance" is bad answer).
> 
> Because daemon use only one field from this structure (I wanted to
> not bloat code and used already defined structure here) still passing
> structure with data from a previous request is a bad habbit, even if you
> don't use them inside daemon code I think.

Why don't you zeroify all the other data exchange between crtools and
parasite? We use it is lots of places.

> .
> 




More information about the CRIU mailing list