From owner-svn-src-head@FreeBSD.ORG Sat Dec 8 04:55:07 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0D6BC866; Sat, 8 Dec 2012 04:55:07 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E3F038FC0C; Sat, 8 Dec 2012 04:55:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qB84t6t8067420; Sat, 8 Dec 2012 04:55:06 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qB84t6er067419; Sat, 8 Dec 2012 04:55:06 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201212080455.qB84t6er067419@svn.freebsd.org> From: "Kenneth D. Merry" Date: Sat, 8 Dec 2012 04:55:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r244016 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Dec 2012 04:55:07 -0000 Author: ken Date: Sat Dec 8 04:55:06 2012 New Revision: 244016 URL: http://svnweb.freebsd.org/changeset/base/244016 Log: Make sure we hold the SIM lock when calling xpt_free_path(). Sponsored by: Spectra Logic Corporation MFC after: 1 week Modified: head/sys/cam/ctl/scsi_ctl.c Modified: head/sys/cam/ctl/scsi_ctl.c ============================================================================== --- head/sys/cam/ctl/scsi_ctl.c Sat Dec 8 04:16:07 2012 (r244015) +++ head/sys/cam/ctl/scsi_ctl.c Sat Dec 8 04:55:06 2012 (r244016) @@ -1822,8 +1822,6 @@ ctlfe_onoffline(void *arg, int online) xpt_action(ccb); - CAM_SIM_UNLOCK(sim); - if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { printf("%s: SIM %s (path id %d) target %s failed with " "status %#x\n", @@ -1836,9 +1834,12 @@ ctlfe_onoffline(void *arg, int online) (online != 0) ? "enable" : "disable"); } - free(ccb, M_TEMP); xpt_free_path(path); + CAM_SIM_UNLOCK(sim); + + free(ccb, M_TEMP); + return; } @@ -1920,10 +1921,10 @@ ctlfe_lun_enable(void *arg, struct ctl_i 0, softc); - mtx_unlock(sim->mtx); - xpt_free_path(path); + mtx_unlock(sim->mtx); + return (0); }