svn commit: r207387 - stable/7/sys/dev/mpt

Matt Jacob mjacob at FreeBSD.org
Thu Apr 29 19:13:42 UTC 2010


Author: mjacob
Date: Thu Apr 29 19:13:42 2010
New Revision: 207387
URL: http://svn.freebsd.org/changeset/base/207387

Log:
  This is an MFC of 205932.
  nit: xpt_bus_deregister has to be called with the sim lock held.

Modified:
  stable/7/sys/dev/mpt/mpt_cam.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/mpt/mpt_cam.c
==============================================================================
--- stable/7/sys/dev/mpt/mpt_cam.c	Thu Apr 29 19:11:25 2010	(r207386)
+++ stable/7/sys/dev/mpt/mpt_cam.c	Thu Apr 29 19:13:42 2010	(r207387)
@@ -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;
 	}


More information about the svn-src-stable-7 mailing list