aboutsummaryrefslogtreecommitdiff
path: root/sys/cam
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2017-10-15 23:54:04 +0000
committerWarner Losh <imp@FreeBSD.org>2017-10-15 23:54:04 +0000
commit1f88be2d3aa026472e12b9040117042fd4cdc639 (patch)
tree03d282dd8faf5854fa0fa2eff9dbde8df96fa21b /sys/cam
parentfa271a5d09d6dc12cd0e3838cd92a90daaf5819c (diff)
downloadsrc-1f88be2d3aa026472e12b9040117042fd4cdc639.tar.gz
src-1f88be2d3aa026472e12b9040117042fd4cdc639.zip
Zero out the ccb's alloated on the stack for the dump routines to more
closely match a ccb returned from xpt_get_ccb(). Sponsored by: Netflix
Notes
Notes: svn path=/head/; revision=324645
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/ata/ata_da.c1
-rw-r--r--sys/cam/scsi/scsi_da.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/sys/cam/ata/ata_da.c b/sys/cam/ata/ata_da.c
index 5f000e05511c..ca16f226426c 100644
--- a/sys/cam/ata/ata_da.c
+++ b/sys/cam/ata/ata_da.c
@@ -1057,6 +1057,7 @@ adadump(void *arg, void *virtual, vm_offset_t physical, off_t offset, size_t len
return (ENXIO);
}
+ memset(&ccb, 0, sizeof(ccb));
if (length > 0) {
xpt_setup_ccb(&ccb.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
ccb.ccb_h.ccb_state = ADA_CCB_DUMP;
diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c
index b9a98b5aac25..061ea9d93398 100644
--- a/sys/cam/scsi/scsi_da.c
+++ b/sys/cam/scsi/scsi_da.c
@@ -1646,6 +1646,7 @@ dadump(void *arg, void *virtual, vm_offset_t physical, off_t offset, size_t leng
return (ENXIO);
}
+ memset(&csio, 0, sizeof(csio));
if (length > 0) {
xpt_setup_ccb(&csio.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
csio.ccb_h.ccb_state = DA_CCB_DUMP;