From: Tony Asleson <tasleson@redhat.com>
To: NeilBrown <neilb@suse.de>
Cc: linux-nfs@vger.kernel.org, Steve Dickson <SteveD@redhat.com>
Subject: Re: [PATCH] exportfs: Return non-zero exit value on error
Date: Thu, 24 Oct 2013 00:34:00 -0500 [thread overview]
Message-ID: <5268B148.6070204@redhat.com> (raw)
In-Reply-To: <20131024091811.34b06e71@notabene.brown>
On 10/23/2013 05:18 PM, NeilBrown wrote:
> On Wed, 23 Oct 2013 12:36:23 -0500 Tony Asleson <tasleson@redhat.com> wrote:
>> For example, if the strdup call fails in function client_init, we fail
>> the operation and return exit value of 0. Unlikely, but just the first
>> example I stumbled across.
>
> I think it is a lot closer to "impossible" than just "unlikely".
> malloc doesn't fail in this sort of context, the OOM killer kills something
> off instead.
> My personal preference is to replace all malloc/calloc/strdup calls with
> the xmalloc, xstrdup etc calls in support/nfs/xcommon.c.
> If you are worried about malloc failing, I'd much prefer to see a patch which
> changes nfs-utils to use those uniformly.
Sorry, my real point was that there are other ways for exportfs to fail
to do the operation and fail to report it, thus the reason my patch was
more invasive. I will try to find another more likely example that
illustrates this.
Regards,
Tony
next prev parent reply other threads:[~2013-10-24 5:34 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-02 23:29 [PATCH] exportfs: Return non-zero exit value on error Tony Asleson
2013-10-21 22:25 ` NeilBrown
2013-10-22 8:38 ` Steve Dickson
2013-10-22 15:23 ` Tony Asleson
2013-10-23 1:44 ` NeilBrown
2013-10-23 17:36 ` Tony Asleson
2013-10-23 22:18 ` NeilBrown
2013-10-23 23:31 ` Chuck Lever
2013-10-24 15:56 ` Steve Dickson
2013-10-24 16:05 ` Chuck Lever
2013-10-28 3:39 ` NeilBrown
2013-10-28 14:09 ` Chuck Lever
2013-10-24 5:34 ` Tony Asleson [this message]
2013-10-22 8:30 ` Steve Dickson
2013-10-22 8:36 ` Steve Dickson
2013-10-28 22:35 ` NeilBrown
2013-11-04 15:33 ` Steve Dickson
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=5268B148.6070204@redhat.com \
--to=tasleson@redhat.com \
--cc=SteveD@redhat.com \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
/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;
as well as URLs for NNTP newsgroup(s).