From: "Steinar H. Gunderson" <sesse@debian.org>
To: nfs@lists.sourceforge.net
Subject: [PATCH] Fix logging segfaults on amd64
Date: Sun, 21 Oct 2007 13:02:57 +0200 [thread overview]
Message-ID: <20071021110257.GA24016@uio.no> (raw)
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);
fprintf(stderr, "\n");
}
+ va_end(args2);
+
if (kind == L_FATAL)
exit(1);
}
/* Steinar */
--
Homepage: http://www.sesse.net/
-------------------------------------------------------------------------
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 reply other threads:[~2007-10-21 11:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-21 11:02 Steinar H. Gunderson [this message]
2007-10-22 13:47 ` [PATCH] Fix logging segfaults on amd64 Kevin Coffman
2007-11-03 12:51 ` Steve Dickson
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=20071021110257.GA24016@uio.no \
--to=sesse@debian.org \
--cc=nfs@lists.sourceforge.net \
/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