[PATCH 5/7] kernel/cred.c: ckpt_err at restart

Serge E. Hallyn serue at us.ibm.com
Mon Nov 16 08:51:33 PST 2009


Quoting Oren Laadan (orenl at cs.columbia.edu):
> 
> 
> serue at us.ibm.com wrote:
> > From: Serge E. Hallyn <serue at us.ibm.com>
> > 
> > Signed-off-by: Serge E. Hallyn <serue at us.ibm.com>
> > ---
> >  kernel/cred.c |   46 ++++++++++++++++++++++++++++++++++++----------
> >  1 files changed, 36 insertions(+), 10 deletions(-)
> > 
> > diff --git a/kernel/cred.c b/kernel/cred.c
> > index 62d28a4..c941078 100644
> > --- a/kernel/cred.c
> > +++ b/kernel/cred.c
> > @@ -764,32 +764,46 @@ static struct cred *do_restore_cred(struct ckpt_ctx *ctx)
> >  	int i;
> >  
> >  	h = ckpt_read_obj_type(ctx, sizeof(*h), CKPT_HDR_CRED);
> > -	if (IS_ERR(h))
> > +	if (IS_ERR(h)) {
> > +		ckpt_err(ctx, ret, "reading cred entry\n");
> 
> This error is better reported for _all_ callers of ckpt_read_obj_type()
> from that function ?
> 
> I am thinking that moving the report to the specific place where an
> error occurs, plus data from the image file (and location there)
> should be sufficient for debugging.

Yeah, it would help reduce the code size too.  I guess I was
thinking the caller would have extra information, but it really
doesn't, or if in the rare caes it does then it can add it.  Good
idea.

thanks,
-serge


More information about the Containers mailing list