From: Christian Ehrhardt <ehrhardt@mathematik.uni-ulm.de>
To: Andi Kleen <ak@suse.de>
Cc: linux-kernel@vger.kernel.org
Subject: Undefined behaviour with get_cpu_vendor
Date: Wed, 17 Aug 2005 11:54:23 +0200 [thread overview]
Message-ID: <20050817095423.625.qmail@thales.mathematik.uni-ulm.de> (raw)
Hi,
Your Patch at (URL wrapped)
http://www.kernel.org/git/?p=linux/kernel/git/torvalds/old-2.6-bkcvs.git; \
a=commit;h=99c6e60afff8a7bc6121aeb847dab27c556cf0c9
introduced an additional Parameter (int early) to get_cpu_vendor.
However, the same function is called in arch/i386/kernel/apic.c (via
an explicit extern declaration that doesn't have the new early parameter.
I don't know if this can cause actual problems but I think something like
the patch below is needed for correctness.
regards Christian
--- arch/i386/kernel/apic.c 2005-03-26 04:28:38.000000000 +0100
+++ arch/i386/kernel/apic.c.new 2005-08-17 11:54:48.070499352 +0200
@@ -703,14 +703,14 @@
static int __init detect_init_APIC (void)
{
u32 h, l, features;
- extern void get_cpu_vendor(struct cpuinfo_x86*);
+ extern void get_cpu_vendor(struct cpuinfo_x86*, int);
/* Disabled by kernel option? */
if (enable_local_apic < 0)
return -1;
/* Workaround for us being called before identify_cpu(). */
- get_cpu_vendor(&boot_cpu_data);
+ get_cpu_vendor(&boot_cpu_data, 1);
switch (boot_cpu_data.x86_vendor) {
case X86_VENDOR_AMD:
--
THAT'S ALL FOLKS!
next reply other threads:[~2005-08-17 9:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-17 9:54 Christian Ehrhardt [this message]
2005-08-17 10:21 ` Andreas Schwab
2005-08-17 11:50 ` Andi Kleen
2005-08-17 20:08 ` Horst von Brand
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=20050817095423.625.qmail@thales.mathematik.uni-ulm.de \
--to=ehrhardt@mathematik.uni-ulm.de \
--cc=ak@suse.de \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®