diff options
author | ken <ken@FreeBSD.org> | 2012-12-08 04:55:06 +0000 |
---|---|---|
committer | ken <ken@FreeBSD.org> | 2012-12-08 04:55:06 +0000 |
commit | 30f51af395fa49fcfd8564901a3c5e57c195d38a (patch) | |
tree | b90a9b0bc11697566a53834dc93a867316c6cddf /sys/cam | |
parent | f5244841304d34e9c2d5ba667f07c98b7cdd8b08 (diff) | |
download | FreeBSD-src-30f51af395fa49fcfd8564901a3c5e57c195d38a.zip FreeBSD-src-30f51af395fa49fcfd8564901a3c5e57c195d38a.tar.gz |
Make sure we hold the SIM lock when calling xpt_free_path().
Sponsored by: Spectra Logic Corporation
MFC after: 1 week
Diffstat (limited to 'sys/cam')
-rw-r--r-- | sys/cam/ctl/scsi_ctl.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/cam/ctl/scsi_ctl.c b/sys/cam/ctl/scsi_ctl.c index c5809fc..898b8f4 100644 --- a/sys/cam/ctl/scsi_ctl.c +++ b/sys/cam/ctl/scsi_ctl.c @@ -1822,8 +1822,6 @@ ctlfe_onoffline(void *arg, int online) xpt_action(ccb); - CAM_SIM_UNLOCK(sim); - if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { printf("%s: SIM %s (path id %d) target %s failed with " "status %#x\n", @@ -1836,9 +1834,12 @@ ctlfe_onoffline(void *arg, int online) (online != 0) ? "enable" : "disable"); } - free(ccb, M_TEMP); xpt_free_path(path); + CAM_SIM_UNLOCK(sim); + + free(ccb, M_TEMP); + return; } @@ -1920,10 +1921,10 @@ ctlfe_lun_enable(void *arg, struct ctl_id targ_id, int lun_id) 0, softc); - mtx_unlock(sim->mtx); - xpt_free_path(path); + mtx_unlock(sim->mtx); + return (0); } |