[CRIU] images rework

Cyrill Gorcunov gorcunov at openvz.org
Mon Apr 9 08:35:08 EDT 2012


On Mon, Apr 09, 2012 at 04:26:44PM +0400, Pavel Emelyanov wrote:
...
> > 
> > That said, it's not a problem at moment but really
> > a time bomb I think. So I would suggest to patch it
> > as
> > 
> > +static int dump_task_fs(pid_t pid, struct cr_fdset *fdset)
> > +{
> > +       struct fd_parms p = { };
> >         ...
> > +       p.type = FDINFO_REG;
> > +       fe.cwd_id = fd_id_generate_special();
> > 
> > what do you think?
> 
> I think that you're trying to replace one bomb with another. Having a
> garbage in a structure makes you sometimes hit a bug when using field you
> wasn't supposed to, but putting zeroes into it can make you live with it
> without realizing that you're doing smth wrong.

Sometimes is a keyword here. But I agree this might play evil joke
eventually. Maybe we need some init helper here (like INIT_LIST_HEAD)?
Sure it's not urgent by any means, but still.

	Cyrill


More information about the CRIU mailing list