[PATCH] fix for crash for invalid MP table

From: Balazs Scheidler
Date: Wed Nov 26 2003 - 03:46:27 EST


Hi,

Attached you will find a patch which changes a couple of 'panic' calls to
'printk' in the MP table parsing code. The problem is that panics so early
in the boot process cause nothing to be printed on the console, my laptop
froze immediately after printing "Uncompressing Linux..."

Changing the panics to printks solved the problem here, the kernel displays
an error message but then continues to boot. I can finally use the lapic
with this patch in place.

--
Bazsi
PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
--- linux-2.6.0-test9/arch/i386/kernel/mpparse.c Wed Nov 26 09:36:27 2003
+++ linux-2.6.0-test9/arch/i386/kernel/mpparse.c Wed Nov 26 09:31:49 2003
@@ -361,7 +361,7 @@
unsigned char *mpt=((unsigned char *)mpc)+count;

if (memcmp(mpc->mpc_signature,MPC_SIGNATURE,4)) {
- panic("SMP mptable: bad signature [%c%c%c%c]!\n",
+ printk("SMP mptable: bad signature [%c%c%c%c]!\n",
mpc->mpc_signature[0],
mpc->mpc_signature[1],
mpc->mpc_signature[2],
@@ -369,7 +369,7 @@
return 0;
}
if (mpf_checksum((unsigned char *)mpc,mpc->mpc_length)) {
- panic("SMP mptable: checksum error!\n");
+ printk("SMP mptable: checksum error!\n");
return 0;
}
if (mpc->mpc_spec!=0x01 && mpc->mpc_spec!=0x04) {