From: Gerd Knorr <kraxel@bytesex.org>
To: Markus Trippelsdorf <markus@trippelsdorf.de>
Cc: Adrian Bunk <bunk@stusta.de>, Andrew Morton <akpm@osdl.org>,
linux-kernel@vger.kernel.org, video4linux-list@redhat.com
Subject: Re: [patch] 2.6.10-rc1-mm4: bttv-driver.c compile error
Date: Thu, 18 Nov 2004 17:58:54 +0100 [thread overview]
Message-ID: <20041118165853.GA22216@bytesex> (raw)
In-Reply-To: <1100085569.1591.6.camel@lb.loomes.de>
> kobject_register failed forBAÿÿÿÿ (-17)
Yet another kobject bug. It uses the varargs list twice in a illegal
way. That doesn't harm on i386 by pure luck, but blows things up on
amd64 machines. The patch below fixes it.
Enjoy,
Gerd
==============================[ cut here ]==============================
Subject: [patch] fix kobject varargs bug
Using var args list twice without calling va_start twice is illegal.
Signed-off-by: Gerd Knorr <kraxel@bytesex.org>
---
lib/kobject.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
Index: linux-2.6.10-rc2/lib/kobject.c
===================================================================
--- linux-2.6.10-rc2.orig/lib/kobject.c 2004-11-17 18:41:43.000000000 +0100
+++ linux-2.6.10-rc2/lib/kobject.c 2004-11-18 17:37:08.851041667 +0100
@@ -232,11 +232,12 @@ int kobject_set_name(struct kobject * ko
va_list args;
char * name;
- va_start(args,fmt);
/*
* First, try the static array
*/
+ va_start(args,fmt);
need = vsnprintf(kobj->name,limit,fmt,args);
+ va_end(args);
if (need < limit)
name = kobj->name;
else {
@@ -249,7 +250,9 @@ int kobject_set_name(struct kobject * ko
error = -ENOMEM;
goto Done;
}
+ va_start(args,fmt);
need = vsnprintf(name,limit,fmt,args);
+ va_end(args);
/* Still? Give up. */
if (need >= limit) {
@@ -266,7 +269,6 @@ int kobject_set_name(struct kobject * ko
/* Now, set the new name */
kobj->k_name = name;
Done:
- va_end(args);
return error;
}
next prev parent reply other threads:[~2004-11-18 17:23 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-09 15:49 2.6.10-rc1-mm4 Andrew Morton
2004-11-09 16:11 ` 2.6.10-rc1-mm4 Jens Axboe
2004-11-09 19:53 ` 2.6.10-rc1-mm4 Andrew Morton
2004-11-09 21:14 ` 2.6.10-rc1-mm4 Jens Axboe
2004-11-09 21:57 ` 2.6.10-rc1-mm4 Jens Axboe
2004-11-10 16:28 ` 2.6.10-rc1-mm4 Jens Axboe
2004-11-09 16:32 ` 2.6.10-rc1-mm4 Jesse Barnes
2004-11-09 16:41 ` 2.6.10-rc1-mm4 Markus Trippelsdorf
2004-11-09 21:11 ` [patch] 2.6.10-rc1-mm4: bttv-driver.c compile error Adrian Bunk
2004-11-09 21:43 ` Gerd Knorr
2004-11-09 21:55 ` Markus Trippelsdorf
2004-11-10 8:24 ` Gerd Knorr
2004-11-10 8:47 ` Andrew Morton
2004-11-10 11:19 ` Markus Trippelsdorf
2004-11-18 16:58 ` Gerd Knorr [this message]
2004-11-19 11:46 ` Markus Trippelsdorf
[not found] ` <419E689A.5000704@backtobasicsmgmt.com>
2004-11-22 9:43 ` var args in kernel? Gerd Knorr
2004-11-22 10:16 ` Jakub Jelinek
2004-11-22 10:29 ` Gerd Knorr
2004-11-22 11:03 ` Jan Engelhardt
2004-11-22 11:33 ` Jakub Jelinek
2004-11-22 11:39 ` Jan Engelhardt
2004-11-22 12:41 ` Andreas Schwab
2004-11-22 21:42 ` Bill Davidsen
2004-11-22 23:18 ` Jakub Jelinek
2004-11-22 23:43 ` Andreas Schwab
2004-11-23 14:05 ` Jan Engelhardt
2004-11-23 15:07 ` Andreas Schwab
2004-11-23 16:17 ` Jan Engelhardt
2004-11-23 16:45 ` Andreas Schwab
2004-12-01 22:49 ` Bill Davidsen
2004-12-02 0:26 ` Andreas Schwab
2004-11-09 17:02 ` 2.6.10-rc1-mm4 Stefano Rivoir
2004-11-09 23:18 ` 2.6.10-rc1-mm4 Dave Airlie
2004-11-10 1:30 ` 2.6.10-rc1-mm4 Dave Airlie
2004-11-10 7:44 ` 2.6.10-rc1-mm4 Stefano Rivoir
2004-11-11 7:39 ` 2.6.10-rc1-mm4 Stefano Rivoir
2004-11-09 20:30 ` 2.6.10-rc1-mm4: net/tulip/xircom_tulip_cb.c compile error Adrian Bunk
2004-11-09 21:23 ` [2.6 patch] remove stale bttv_parse prototype Adrian Bunk
2004-11-10 11:40 ` 2.6.10-rc1-mm4 Fabio Coatti
2004-11-10 12:36 ` 2.6.10-rc1-mm4 Rafael J. Wysocki
2004-11-11 10:17 ` 2.6.10-rc1-mm4 Stefano Rivoir
2004-11-11 10:24 ` 2.6.10-rc1-mm4 Andrew Morton
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=20041118165853.GA22216@bytesex \
--to=kraxel@bytesex.org \
--cc=akpm@osdl.org \
--cc=bunk@stusta.de \
--cc=linux-kernel@vger.kernel.org \
--cc=markus@trippelsdorf.de \
--cc=video4linux-list@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.