Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Mar 2010 20:39:57 +0000 (UTC)
From:      Matt Jacob <mjacob@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r205932 - head/sys/dev/mpt
Message-ID:  <201003302039.o2UKdvgb089245@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mjacob
Date: Tue Mar 30 20:39:57 2010
New Revision: 205932
URL: http://svn.freebsd.org/changeset/base/205932

Log:
  nit: xpt_bus_deregister has to be called with the sim lock held.
  
  MFC after:	1 month

Modified:
  head/sys/dev/mpt/mpt_cam.c

Modified: head/sys/dev/mpt/mpt_cam.c
==============================================================================
--- head/sys/dev/mpt/mpt_cam.c	Tue Mar 30 20:39:48 2010	(r205931)
+++ head/sys/dev/mpt/mpt_cam.c	Tue Mar 30 20:39:57 2010	(r205932)
@@ -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;
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003302039.o2UKdvgb089245>