From owner-svn-src-stable@FreeBSD.ORG Wed Feb 6 22:32:46 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 47003909; Wed, 6 Feb 2013 22:32:46 +0000 (UTC) (envelope-from mav@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 36C31F8A; Wed, 6 Feb 2013 22:32:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r16MWknB091955; Wed, 6 Feb 2013 22:32:46 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r16MWkvD091954; Wed, 6 Feb 2013 22:32:46 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201302062232.r16MWkvD091954@svn.freebsd.org> From: Alexander Motin Date: Wed, 6 Feb 2013 22:32:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r246441 - stable/9/sys/cam/ctl X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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: Wed, 06 Feb 2013 22:32:46 -0000 Author: mav Date: Wed Feb 6 22:32:45 2013 New Revision: 246441 URL: http://svnweb.freebsd.org/changeset/base/246441 Log: MFC r244016 (by ken): Make sure we hold the SIM lock when calling xpt_free_path(). Sponsored by: Spectra Logic Corporation Modified: stable/9/sys/cam/ctl/scsi_ctl.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/ctl/scsi_ctl.c ============================================================================== --- stable/9/sys/cam/ctl/scsi_ctl.c Wed Feb 6 22:30:40 2013 (r246440) +++ stable/9/sys/cam/ctl/scsi_ctl.c Wed Feb 6 22:32:45 2013 (r246441) @@ -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); }