]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] small fix for mpparse.c
authorGreg Kroah-Hartman <greg@kroah.com>
Wed, 3 Apr 2002 03:19:39 +0000 (19:19 -0800)
committerGreg Kroah-Hartman <greg@kroah.com>
Wed, 3 Apr 2002 03:19:39 +0000 (19:19 -0800)
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.

arch/i386/kernel/mpparse.c

index 313f05f6f2bd7dc3cdd47a9363e6bc44ecad20ea..c779305dba6aa89577ba08d89222411daa27b4af 100644 (file)
@@ -232,6 +232,7 @@ void __init MP_processor_info (struct mpc_config_processor *m)
        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;