mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
dadump: don't leak the periph lock on i/o error
Reported by: az MFC after: 1 week
This commit is contained in:
parent
ea3282935d
commit
996775de4b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=230157
@ -1148,6 +1148,7 @@ dadump(void *arg, void *virtual, vm_offset_t physical, off_t offset, size_t leng
|
||||
/*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_offset_t physical, off_t offset, size_t leng
|
||||
csio.ccb_h.status, csio.scsi_status);
|
||||
return(EIO);
|
||||
}
|
||||
cam_periph_unlock(periph);
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user