svn commit: r231522 - stable/9/sys/cam/scsi

Andriy Gapon avg at FreeBSD.org
Sat Feb 11 14:55:06 UTC 2012


Author: avg
Date: Sat Feb 11 14:55:05 2012
New Revision: 231522
URL: http://svn.freebsd.org/changeset/base/231522

Log:
  MFC r230157: dadump: don't leak the periph lock on i/o error

Modified:
  stable/9/sys/cam/scsi/scsi_da.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/cam/scsi/scsi_da.c
==============================================================================
--- stable/9/sys/cam/scsi/scsi_da.c	Sat Feb 11 14:49:25 2012	(r231521)
+++ stable/9/sys/cam/scsi/scsi_da.c	Sat Feb 11 14:55:05 2012	(r231522)
@@ -1100,6 +1100,7 @@ dadump(void *arg, void *virtual, vm_offs
 				/*sense_len*/SSD_FULL_SIZE,
 				da_default_timeout * 1000);
 		xpt_polled_action((union ccb *)&csio);
+		cam_periph_unlock(periph);
 
 		if ((csio.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) {
 			printf("Aborting dump due to I/O error.\n");
@@ -1111,7 +1112,6 @@ dadump(void *arg, void *virtual, vm_offs
 				       csio.ccb_h.status, csio.scsi_status);
 			return(EIO);
 		}
-		cam_periph_unlock(periph);
 		return(0);
 	}
 		


More information about the svn-src-stable-9 mailing list