From: Rusty Russell <rusty@rustcorp.com.au>
To: Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
Cc: Jerone Young <jyoung5@us.ibm.com>,
xen-devel <xen-devel@lists.xensource.com>
Subject: Re: [PATCH] tiddyup tools/xenstore/talloc.c
Date: Fri, 12 Aug 2005 13:32:08 +1000 [thread overview]
Message-ID: <1123817528.28457.29.camel@localhost.localdomain> (raw)
In-Reply-To: <93d31f0a8151dc28568a23929efeded8@cl.cam.ac.uk>
On Thu, 2005-08-11 at 22:58 +0100, Keir Fraser wrote:
> On 11 Aug 2005, at 22:15, Jerone Young wrote:
>
> > Add check so that p is not operated on if context is not also null.
> >
> > Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
>
> No idea on this one. I think that case is probably impossible so the
> test could just be simplified, but probably only tridge knows for sure.
> :-)
Actually the code is fine: it looks for a reference to the given parent
context. p + 1 cannot be NULL, since either p is NULL, or (p + 1) has
at some stage been returned by _talloc(), which cannot return NULL.
> I think xenstore can probably be weaned off talloc at some point.
Heh, good luck with that! Removing the destructors and replacing them
with explicit calls would not be too complicated, as the structures are
all fairly simple, but you'll be chasing down memory leaks for a long
time through all the failure paths.
You will have lots and lots of fun handling out-of-memory conditions,
which we do at the moment although, regrettably, not everywhere: if
destroy_path() fails we abort the daemon 8(.
Actually, the OOM code is ugly and I'd love to get rid of it, but I know
people like these kind of checks, even if they're never 100%.
Rusty.
--
A bad analogy is like a leaky screwdriver -- Richard Braakman
prev parent reply other threads:[~2005-08-12 3:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-11 21:15 [PATCH] tiddyup tools/xenstore/talloc.c Jerone Young
2005-08-11 21:58 ` Keir Fraser
2005-08-11 22:05 ` Jerone Young
2005-08-12 3:32 ` Rusty Russell [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=1123817528.28457.29.camel@localhost.localdomain \
--to=rusty@rustcorp.com.au \
--cc=Keir.Fraser@cl.cam.ac.uk \
--cc=jyoung5@us.ibm.com \
--cc=xen-devel@lists.xensource.com \
/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.