Mercurial > illumos > illumos-gate
changeset 6685:1d2a26f76788
6696497 panic in gcpu_ntv_mca_poll_online with chip ids greater than 15
author | stephh |
---|---|
date | Thu, 22 May 2008 01:39:48 -0700 |
parents | 743df5702ca3 |
children | 3c9396c20a27 |
files | usr/src/uts/i86pc/os/cmi_hw.c |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/i86pc/os/cmi_hw.c Wed May 21 21:55:43 2008 -0700 +++ b/usr/src/uts/i86pc/os/cmi_hw.c Thu May 22 01:39:48 2008 -0700 @@ -919,7 +919,13 @@ cmi_hdl_lookup(enum cmi_hdl_class class, uint_t chipid, uint_t coreid, uint_t strandid) { - int idx = CMI_HDL_ARR_IDX(chipid, coreid, strandid); + int idx; + + if (chipid > CMI_MAX_CHIPS - 1 || coreid > CMI_MAX_CORES_PER_CHIP - 1 || + strandid > CMI_MAX_STRANDS_PER_CORE - 1) + return (NULL); + + idx = CMI_HDL_ARR_IDX(chipid, coreid, strandid); if (!cmi_hdl_canref(idx)) return (NULL);