summaryrefslogtreecommitdiffstats
path: root/sys/dev/mpt
diff options
context:
space:
mode:
authormjacob <mjacob@FreeBSD.org>2010-03-30 20:39:57 +0000
committermjacob <mjacob@FreeBSD.org>2010-03-30 20:39:57 +0000
commitdb0ff56d4394a5a8b53e7726cd2ee0845520434d (patch)
tree3baa5d4db38ee34c8d41dbcaf68b6c88fb0b5e85 /sys/dev/mpt
parentb0211eb589d956b8e844805fca5e102422e5d766 (diff)
downloadFreeBSD-src-db0ff56d4394a5a8b53e7726cd2ee0845520434d.zip
FreeBSD-src-db0ff56d4394a5a8b53e7726cd2ee0845520434d.tar.gz
nit: xpt_bus_deregister has to be called with the sim lock held.
MFC after: 1 month
Diffstat (limited to 'sys/dev/mpt')
-rw-r--r--sys/dev/mpt/mpt_cam.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/mpt/mpt_cam.c b/sys/dev/mpt/mpt_cam.c
index 302030f..5e63ef9 100644
--- a/sys/dev/mpt/mpt_cam.c
+++ b/sys/dev/mpt/mpt_cam.c
@@ -1208,14 +1208,18 @@ mpt_cam_detach(struct mpt_softc *mpt)
if (mpt->sim != NULL) {
xpt_free_path(mpt->path);
+ MPT_LOCK(mpt);
xpt_bus_deregister(cam_sim_path(mpt->sim));
+ MPT_UNLOCK(mpt);
cam_sim_free(mpt->sim, TRUE);
mpt->sim = NULL;
}
if (mpt->phydisk_sim != NULL) {
xpt_free_path(mpt->phydisk_path);
+ MPT_LOCK(mpt);
xpt_bus_deregister(cam_sim_path(mpt->phydisk_sim));
+ MPT_UNLOCK(mpt);
cam_sim_free(mpt->phydisk_sim, TRUE);
mpt->phydisk_sim = NULL;
}
OpenPOWER on IntegriCloud