From: Steve Dickson <SteveD@redhat.com>
To: "Steinar H. Gunderson" <sesse@debian.org>
Cc: nfs@lists.sourceforge.net
Subject: Re: [PATCH] Fix logging segfaults on amd64
Date: Sat, 03 Nov 2007 08:51:58 -0400 [thread overview]
Message-ID: <472C6EEE.4070900@RedHat.com> (raw)
In-Reply-To: <20071021110257.GA24016@uio.no>
Steinar H. Gunderson wrote:
> Hi,
>
> It seems an error crept into nfs-utils 1.1.1 just before release, so exportfs
> -r segfaults on amd64 whenever there is a warning. The attached patch, from
> Steve Langasek, fixes the issue (an abuse of va_list).
>
> Signed-off-by: Steinar H. Gunderson <sesse@debian.org>
> Signed-off-by: Steve Langasek <vorlon@debian.org>
>
> --- nfs-utils-1.1.1.orig/support/nfs/xlog.c
> +++ nfs-utils-1.1.1/support/nfs/xlog.c
> @@ -133,9 +133,13 @@ xlog_enabled(int fac)
> void
> xlog_backend(int kind, const char *fmt, va_list args)
> {
> + va_list args2;
> +
> if (!(kind & (L_ALL)) && !(logging && (kind & logmask)))
> return;
>
> + va_copy(args2, args);
> +
> if (log_syslog) {
> switch (kind) {
> case L_FATAL:
> @@ -172,10 +176,12 @@ xlog_backend(int kind, const char *fmt,
> fprintf(stderr, "%s: ", log_name);
> #endif
>
> - vfprintf(stderr, fmt, args);
> + vfprintf(stderr, fmt, args2);
How is using args here "an abuse of va_list"? It seem pretty
straightforward to me...
steved.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
next prev parent reply other threads:[~2007-11-03 12:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-21 11:02 [PATCH] Fix logging segfaults on amd64 Steinar H. Gunderson
2007-10-22 13:47 ` Kevin Coffman
2007-11-03 12:51 ` Steve Dickson [this message]
2007-11-03 14:36 ` Steinar H. Gunderson
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=472C6EEE.4070900@RedHat.com \
--to=steved@redhat.com \
--cc=nfs@lists.sourceforge.net \
--cc=sesse@debian.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