Mercurial > illumos > illumos-gate
changeset 11256:4dbbde47c138
6901707 panic BAD TRAP: Page fault in module "pmcs" due to NULL pointer dereference when reseating SAS cable
author | Srikanth, Ramana <Ramana.Srikanth@Sun.COM> |
---|---|
date | Fri, 04 Dec 2009 19:21:57 -0500 |
parents | ffdbe2f24fa6 |
children | 9e958eb3e4e3 |
files | usr/src/uts/common/io/scsi/adapters/pmcs/pmcs_ds.c |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/common/io/scsi/adapters/pmcs/pmcs_ds.c Fri Dec 04 17:08:31 2009 -0700 +++ b/usr/src/uts/common/io/scsi/adapters/pmcs/pmcs_ds.c Fri Dec 04 19:21:57 2009 -0500 @@ -53,6 +53,12 @@ if (xp != NULL) { ASSERT(mutex_owned(&xp->statlock)); } + + if (phyp == NULL) { + pmcs_prt(pwp, PMCS_PRT_DEBUG_DEV_STATE, NULL, xp, + "%s: PHY is NULL", __func__); + return (-1); + } ASSERT(mutex_owned(&phyp->phy_lock)); pwrk = pmcs_gwork(pwp, PMCS_TAG_TYPE_WAIT, phyp);