Skip to contentSkip to conversation

small fix for mpparse.c

PATCH New Greg KH 1 participant 1 message Mar 6, 2002

lore
Share & tools
lore

Greg KH

author
#0 lore raw

PATCH 1/1 small fix for mpparse.c

Hi,

Here's a very tiny bugfix for arch/i386/kernel/mpparse.c in the 2.4.19-pre2 kernel. It fixes the problem if there is an error in the MP_processor_info() function where the mpc_apicid value is greater than MAX_APICS, then we need to decrement the number of valid processors before we return (the number was just incremented before the check.)

The patch was written by James Cleverdon.

thanks,

greg k-h

arch/i386/kernel/mpparse.c +1 -0
diff -Nru a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c
@@ -221,6 +221,7 @@
 	if (m->mpc_apicid > MAX_APICS) {
 		printk("Processor #%d INVALID. (Max ID: %d).\n",
 			m->mpc_apicid, MAX_APICS);
+		--num_processors;
 		return;
 	}
 	ver = m->mpc_apicver;