From owner-svn-src-stable@FreeBSD.ORG Thu Apr 29 19:13:42 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D224106564A; Thu, 29 Apr 2010 19:13:42 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4BA098FC21; Thu, 29 Apr 2010 19:13:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3TJDgwN033958; Thu, 29 Apr 2010 19:13:42 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3TJDgS4033956; Thu, 29 Apr 2010 19:13:42 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201004291913.o3TJDgS4033956@svn.freebsd.org> From: Matt Jacob Date: Thu, 29 Apr 2010 19:13:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207387 - stable/7/sys/dev/mpt X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Apr 2010 19:13:42 -0000 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; }