All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oren Laadan <orenl-RdfvBDnrOixBDgjK7y7TUQ@public.gmane.org>
To: Dan Smith <danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Cc: containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org
Subject: Re: [PATCH] Fix ckpt_obj_lookup_add() leak detection logic
Date: Fri, 18 Sep 2009 13:01:12 -0400	[thread overview]
Message-ID: <4AB3BCD8.1080102@librato.com> (raw)
In-Reply-To: <1253207274-7563-1-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>


Got it, thanks.

Dan Smith wrote:
> Since first is a pointer, it's never NULL and thus leak detection will
> always be performed (of CHECKPOINT_SUBTREE is set).  This fatally breaks
> the checkpoint process when that flag is enabled because any object (with
> a ref_users operation) that is added to the hash twice will be reported as
> a reverse leak.
> 
> Signed-off-by: Dan Smith <danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
> ---
>  checkpoint/objhash.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/checkpoint/objhash.c b/checkpoint/objhash.c
> index 8dfb0b0..b85aa77 100644
> --- a/checkpoint/objhash.c
> +++ b/checkpoint/objhash.c
> @@ -679,7 +679,7 @@ int ckpt_obj_lookup_add(struct ckpt_ctx *ctx, void *ptr,
>  	ckpt_debug("%s objref %d first %d\n",
>  		   obj->ops->obj_name, obj->objref, *first);
>  
> -	if (first && obj_reverse_leak(ctx, obj))
> +	if (*first && obj_reverse_leak(ctx, obj))
>  		return -EBUSY;
>  
>  	obj->flags |= CKPT_OBJ_VISITED;

      parent reply	other threads:[~2009-09-18 17:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-17 17:07 [PATCH] Fix ckpt_obj_lookup_add() leak detection logic Dan Smith
     [not found] ` <1253207274-7563-1-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-09-18 17:01   ` Oren Laadan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AB3BCD8.1080102@librato.com \
    --to=orenl-rdfvbdnroixbdgjk7y7tuq@public.gmane.org \
    --cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
    --cc=danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.