From f0b41ca4fcc4a078bf412c71f7eaad4dbe2ab01b Mon Sep 17 00:00:00 2001 From: Matt Jacob Date: Tue, 30 Mar 2010 20:39:57 +0000 Subject: [PATCH] nit: xpt_bus_deregister has to be called with the sim lock held. MFC after: 1 month --- sys/dev/mpt/mpt_cam.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/dev/mpt/mpt_cam.c b/sys/dev/mpt/mpt_cam.c index 302030f9f341..5e63ef908bd6 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; }