Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Oct 2010 18:06:30 +0000 (UTC)
From:      Matthew D Fleming <mdf@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r213589 - stable/7/sys/cam/scsi
Message-ID:  <201010081806.o98I6Ujv002321@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mdf
Date: Fri Oct  8 18:06:30 2010
New Revision: 213589
URL: http://svn.freebsd.org/changeset/base/213589

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/7/sys/cam/scsi/scsi_pass.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/cam/scsi/scsi_pass.c
==============================================================================
--- stable/7/sys/cam/scsi/scsi_pass.c	Fri Oct  8 18:06:15 2010	(r213588)
+++ stable/7/sys/cam/scsi/scsi_pass.c	Fri Oct  8 18:06:30 2010	(r213589)
@@ -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);
 }



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