From: Alex Elder <aelder@sgi.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 1/5] xfsprogs: libxcmd: don't clobber fs_table on realloc()
Date: Thu, 29 Sep 2011 09:10:55 -0500 [thread overview]
Message-ID: <1317305455.3049.2.camel@doink> (raw)
In-Reply-To: <20110929005946.GA26863@infradead.org>
On Wed, 2011-09-28 at 20:59 -0400, Christoph Hellwig wrote:
> On Wed, Sep 28, 2011 at 05:57:08AM -0500, Alex Elder wrote:
> > In fs_table_insert(), realloc() is called to resize the global
> > fs_table. If it fails, it overwrites a previously valid fs_table
> > pointer with NULL.
> >
> > Instead, assign the return value to a local temporary and overwrite
> > fs_table only if the realloc() call succeeds. The only defined
> > errno value for a realloc() failure is ENOMEM, so return that
> > explicitly in the event it fails.
>
> Looks good. Did you encounter this issue in real life?
No, just by inspection.
I'm working on fixing a different problem, and to do
so I need to rearrange things a bit. Along the way
I found a bunch of little annoyances like this one,
so I figured I might as well fix them while I'm in
there.
> Reviewed-by: Christoph Hellwig <hch@lst.de>
Thanks a lot for the reviews.
-Alex
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
prev parent reply other threads:[~2011-09-29 14:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-28 10:57 [PATCH 0/5] xfsprogs: some libxcmd cleanups Alex Elder
2011-09-28 10:57 ` [PATCH 1/5] xfsprogs: libxcmd: don't clobber fs_table on realloc() Alex Elder
2011-09-28 10:57 ` [PATCH 2/5] xfsprogs: libxcmd: simplify fs_table_lookup() Alex Elder
2011-09-29 1:00 ` Christoph Hellwig
2011-09-28 10:57 ` [PATCH 3/5] xfsprogs: libxcmd: kill "search" arg in fs_device_number() Alex Elder
2011-09-29 1:01 ` Christoph Hellwig
2011-09-28 10:57 ` [PATCH 4/5] xfsprogs: libxcmd: move fs_device_number() up in the file Alex Elder
2011-09-29 1:01 ` Christoph Hellwig
2011-09-28 10:57 ` [PATCH 5/5] xfsprogs: libxcmd: use fs_device_number() consistently Alex Elder
2011-09-29 1:03 ` Christoph Hellwig
2011-09-29 0:59 ` [PATCH 1/5] xfsprogs: libxcmd: don't clobber fs_table on realloc() Christoph Hellwig
2011-09-29 14:10 ` Alex Elder [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=1317305455.3049.2.camel@doink \
--to=aelder@sgi.com \
--cc=hch@infradead.org \
--cc=xfs@oss.sgi.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox