diff options
author | Chuck Ebbert <76306.1226@compuserve.com> | 2006-02-05 02:28:03 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-05 14:06:53 -0500 |
commit | fe38d8553ccb5237bf0eddda9e94fbca7288551c (patch) | |
tree | 4ebdcf473fcf7e429536e86346c258514671f044 /arch/i386/kernel/cpu/transmeta.c | |
parent | 170aa3d02614ae621d54af10555e2f48977ae8de (diff) |
[PATCH] i386 cpu hotplug: don't access freed memory
i386 CPU init code accesses freed init memory when booting a newly-started
processor after CPU hotplug. The cpu_devs array is searched to find the
vendor and it contains pointers to freed data.
Fix that by:
1. Zeroing entries for freed vendor data after bootup.
2. Changing Transmeta, NSC and UMC to all __init[data].
3. Printing a warning (once only) and setting this_cpu
to a safe default when the vendor is not found.
This does not change behavior for AMD systems. They were broken already
but no error was reported.
Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/i386/kernel/cpu/transmeta.c')
-rw-r--r-- | arch/i386/kernel/cpu/transmeta.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/i386/kernel/cpu/transmeta.c b/arch/i386/kernel/cpu/transmeta.c index fc426380366b..bdbeb77f4e22 100644 --- a/arch/i386/kernel/cpu/transmeta.c +++ b/arch/i386/kernel/cpu/transmeta.c | |||
@@ -84,7 +84,7 @@ static void __init init_transmeta(struct cpuinfo_x86 *c) | |||
84 | #endif | 84 | #endif |
85 | } | 85 | } |
86 | 86 | ||
87 | static void transmeta_identify(struct cpuinfo_x86 * c) | 87 | static void __init transmeta_identify(struct cpuinfo_x86 * c) |
88 | { | 88 | { |
89 | u32 xlvl; | 89 | u32 xlvl; |
90 | generic_identify(c); | 90 | generic_identify(c); |
@@ -111,3 +111,11 @@ int __init transmeta_init_cpu(void) | |||
111 | } | 111 | } |
112 | 112 | ||
113 | //early_arch_initcall(transmeta_init_cpu); | 113 | //early_arch_initcall(transmeta_init_cpu); |
114 | |||
115 | static int __init transmeta_exit_cpu(void) | ||
116 | { | ||
117 | cpu_devs[X86_VENDOR_TRANSMETA] = NULL; | ||
118 | return 0; | ||
119 | } | ||
120 | |||
121 | late_initcall(transmeta_exit_cpu); | ||