Date: Sun, 15 Oct 2017 23:54:04 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r324645 - in head/sys/cam: ata scsi Message-ID: <201710152354.v9FNs4vm088229@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710152354.v9FNs4vm088229>