svn commit: r324645 - in head/sys/cam: ata scsi
Warner Losh
imp at FreeBSD.org
Sun Oct 15 23:54:06 UTC 2017
Author: imp
Date: Sun Oct 15 23:54:04 2017
New Revision: 324645
URL: https://svnweb.freebsd.org/changeset/base/324645
Log:
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
Modified:
head/sys/cam/ata/ata_da.c
head/sys/cam/scsi/scsi_da.c
Modified: head/sys/cam/ata/ata_da.c
==============================================================================
--- head/sys/cam/ata/ata_da.c Sun Oct 15 23:53:55 2017 (r324644)
+++ head/sys/cam/ata/ata_da.c Sun Oct 15 23:54:04 2017 (r324645)
@@ -1057,6 +1057,7 @@ adadump(void *arg, void *virtual, vm_offset_t physical
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;
Modified: head/sys/cam/scsi/scsi_da.c
==============================================================================
--- head/sys/cam/scsi/scsi_da.c Sun Oct 15 23:53:55 2017 (r324644)
+++ head/sys/cam/scsi/scsi_da.c Sun Oct 15 23:54:04 2017 (r324645)
@@ -1646,6 +1646,7 @@ dadump(void *arg, void *virtual, vm_offset_t physical,
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;
More information about the svn-src-head
mailing list