# HG changeset patch # User Jens Rosenboom # Date 1329598680 18000 # Node ID 8abd7b12d92f84c5a9dae59e1ecb5b47002eda4e # Parent 96f1427cec2eb760ffdd060b74b6bc8a1c304b24 1439 Panic when booting on IBM SystemX Reviewed by: Albert Lee Reviewed by: Garrett D'Amore Reviewed by: Richard Lowe Approved by: Richard Lowe diff -r 96f1427cec2e -r 8abd7b12d92f usr/src/uts/intel/os/fmsmb.c --- a/usr/src/uts/intel/os/fmsmb.c Thu Feb 02 22:09:15 2012 +1100 +++ b/usr/src/uts/intel/os/fmsmb.c Sat Feb 18 15:58:00 2012 -0500 @@ -559,7 +559,7 @@ oemstypes->type = SMB_TYPE_OEMSTR; smb_strcnt(shp, oemstypes); - for (i = 0; i < oemstypes->count; i++) { + for (i = 0; i < oemstypes->count && compat == 0; i++) { id = oemstypes->ids[i]->id; cnt = smbios_info_strtab(shp, id, 0, NULL); if (cnt > 0) { @@ -570,26 +570,17 @@ for (j = 0; j < cnt; j++) { if (strncmp(oem_strings[j], SMB_PRMS1, strlen(SMB_PRMS1) + 1) == 0) { - kmem_free(oem_strings, - sizeof (char *) * cnt); - smb_free_strcnt(oemstypes, strcnt); compat = 1; break; } } + kmem_free(oem_strings, sizeof (char *) * cnt); } } - - if (compat == 0) { - /* didn't find x86pi magic cookie */ - if (oem_strings != NULL) - kmem_free(oem_strings, sizeof (char *) * cnt); - smb_free_strcnt(oemstypes, strcnt); - goto bad; - } + smb_free_strcnt(oemstypes, strcnt); /* sanity check SMBIOS structures */ - if (fm_smb_check(shp) == 0) + if ((compat != 0) && (fm_smb_check(shp) == 0)) return; bad: