Author: avg
Date: Sun Jan 15 20:43:39 2012
New Revision: 230157
URL: http://svn.freebsd.org/changeset/base/230157

Log:
  dadump: don't leak the periph lock on i/o error
  
  Reported by:  az
  MFC after:    1 week

Modified:
  head/sys/cam/scsi/scsi_da.c

Modified: head/sys/cam/scsi/scsi_da.c
==============================================================================
--- head/sys/cam/scsi/scsi_da.c Sun Jan 15 20:37:39 2012        (r230156)
+++ head/sys/cam/scsi/scsi_da.c Sun Jan 15 20:43:39 2012        (r230157)
@@ -1148,6 +1148,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");
@@ -1159,7 +1160,6 @@ dadump(void *arg, void *virtual, vm_offs
                                       csio.ccb_h.status, csio.scsi_status);
                        return(EIO);
                }
-               cam_periph_unlock(periph);
                return(0);
        }
                
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to