From owner-svn-src-head@freebsd.org Sun Oct 15 23:54:06 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38CC3E27EFD; Sun, 15 Oct 2017 23:54:06 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 064DB654E5; Sun, 15 Oct 2017 23:54:05 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v9FNs4Hw088231; Sun, 15 Oct 2017 23:54:04 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v9FNs4vm088229; Sun, 15 Oct 2017 23:54:04 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201710152354.v9FNs4vm088229@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 15 Oct 2017 23:54:04 +0000 (UTC) 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 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys/cam: ata scsi X-SVN-Commit-Revision: 324645 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Oct 2017 23:54:06 -0000 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;