[CRIU] Re: [PATCH 3/7] fowners: Add regular files/pipes owners
dumping
Cyrill Gorcunov
gorcunov at openvz.org
Wed Apr 11 06:12:50 EDT 2012
On Wed, Apr 11, 2012 at 02:05:04PM +0400, Pavel Emelyanov wrote:
...
> > static int dump_task_exe_link(pid_t pid, struct mm_entry *mm)
> > {
> > - struct fd_parms params;
> > + struct fd_parms params = { };
> > int fd, ret;
> >
> > fd = open_proc(pid, "exe");
>
> I don't understand this thirst for zeroifying everything larger than int even if
> this thing is about to be re-initialized one line of code below. The code from you
> is always full of this. Please, explain it to me.
>
I need the fown member to be zero here, so I though
- either to use params.fown = (fown_t){ };
- either zeroify everything on declaration
the second is simplier (still I remember what have you said
about zeroifying and hidden bugs). If the first form is preferred,
I'll update the patch.
Cyrill
More information about the CRIU
mailing list