From: Steve Dickson <SteveD@redhat.com>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: "J. Bruce Fields" <bfields@fieldses.org>,
Linux NFS Mailing list <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH] statd: not unlinking host files
Date: Mon, 08 Dec 2008 19:40:29 -0500 [thread overview]
Message-ID: <493DBE7D.3010101@RedHat.com> (raw)
In-Reply-To: <E1EBCB84-864D-4463-811F-4B2610BCABFA@oracle.com>
Chuck Lever wrote:
> On Dec 8, 2008, at Dec 8, 2008, 6:33 PM, J. Bruce Fields wrote:
>> On Sat, Dec 06, 2008 at 09:34:25AM -0500, Steve Dickson wrote:
>>> Again working with the state file code, I notice that statd was
>>> not unlinking hosts files when the kernel sent up the
>>> sm_unmon messages. This following patch address the reason why...
>>>
>>> Comments?
>>
>> Bizarre--thanks for catching that.
>>
>> But it looks like these are actually the only two callers to xunlink?
>> In which case, we should just ditch the "check" parameter entirely and
>> avoid some confusion....
>
> It looks like xunlink() doesn't check error returns properly either.
> alloca() is a convenience, but the price is a SIGSEGV if the stack frame
> can't be extended.
>
> For a system-level daemon like rpc.statd, I would rather see a proper
> implementation of this using malloc(3) or automatic storage, and
> ensuring that sprintf doesn't overrun its buffer. This also makes it
> possible to track the buffer allocation here using valgrind. alloca()
> is a completely inline implementation, according to its man page.
>
> I'm not sure why statd has it's own implementation of xstrdup and
> xmalloc here as well; support/nfs/* already has both of these. It would
> be worth getting rid of these too.
Added to the TODO list...
steved.
next prev parent reply other threads:[~2008-12-09 0:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-06 14:34 [PATCH] statd: not unlinking host files Steve Dickson
[not found] ` <493A8D71.20603-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2008-12-08 23:33 ` J. Bruce Fields
2008-12-08 23:48 ` Chuck Lever
2008-12-09 0:40 ` Steve Dickson [this message]
2008-12-09 0:40 ` Steve Dickson
2008-12-17 21:48 ` 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=493DBE7D.3010101@RedHat.com \
--to=steved@redhat.com \
--cc=bfields@fieldses.org \
--cc=chuck.lever@oracle.com \
--cc=linux-nfs@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox