From owner-svn-src-all@FreeBSD.ORG Fri Oct 8 18:06:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 664F11065670; Fri, 8 Oct 2010 18:06:15 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 571EF8FC14; Fri, 8 Oct 2010 18:06:15 +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 o98I6Fhx002282; Fri, 8 Oct 2010 18:06:15 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o98I6Fmh002280; Fri, 8 Oct 2010 18:06:15 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201010081806.o98I6Fmh002280@svn.freebsd.org> From: Matthew D Fleming Date: Fri, 8 Oct 2010 18:06:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213588 - stable/8/sys/cam/scsi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Oct 2010 18:06:15 -0000 Author: mdf Date: Fri Oct 8 18:06:15 2010 New Revision: 213588 URL: http://svn.freebsd.org/changeset/base/213588 Log: MFC r212926: Use destroy_dev_sched(9) instead of destroy_dev(9) in passcleanup() as it is indirectly a d_close method. Modified: stable/8/sys/cam/scsi/scsi_pass.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/cam/scsi/scsi_pass.c ============================================================================== --- stable/8/sys/cam/scsi/scsi_pass.c Fri Oct 8 17:58:07 2010 (r213587) +++ stable/8/sys/cam/scsi/scsi_pass.c Fri Oct 8 18:06:15 2010 (r213588) @@ -169,7 +169,11 @@ passcleanup(struct cam_periph *periph) xpt_print(periph->path, "removing device entry\n"); devstat_remove_entry(softc->device_stats); cam_periph_unlock(periph); - destroy_dev(softc->dev); + /* + * passcleanup() is indirectly a d_close method via passclose, + * so using destroy_dev(9) directly can result in deadlock. + */ + destroy_dev_sched(softc->dev); cam_periph_lock(periph); free(softc, M_DEVBUF); }