From owner-dev-commits-src-all@freebsd.org Thu Jun 3 13:53:31 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 867FC639FBE; Thu, 3 Jun 2021 13:53:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FwnRb3MSbz3Lf2; Thu, 3 Jun 2021 13:53:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 526D2257D; Thu, 3 Jun 2021 13:53:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 153DrV8B056469; Thu, 3 Jun 2021 13:53:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 153DrVqF056468; Thu, 3 Jun 2021 13:53:31 GMT (envelope-from git) Date: Thu, 3 Jun 2021 13:53:31 GMT Message-Id: <202106031353.153DrVqF056468@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 92f49c769b4e - stable/13 - smartpqi: clear CCBs allocated on the stack MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 92f49c769b4ef51163151c3991357a08941e232d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jun 2021 13:53:31 -0000 The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=92f49c769b4ef51163151c3991357a08941e232d commit 92f49c769b4ef51163151c3991357a08941e232d Author: Edward Tomasz Napierala AuthorDate: 2021-05-28 06:33:37 +0000 Commit: Warner Losh CommitDate: 2021-06-03 13:53:12 +0000 smartpqi: clear CCBs allocated on the stack Differential Revision: https://reviews.freebsd.org/D30299 (cherry picked from commit e20e60be501204c3ba742e266afecc6c6e498a6c) --- sys/dev/smartpqi/smartpqi_cam.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/smartpqi/smartpqi_cam.c b/sys/dev/smartpqi/smartpqi_cam.c index 3d39e1ffbdd4..e389eb143e4a 100644 --- a/sys/dev/smartpqi/smartpqi_cam.c +++ b/sys/dev/smartpqi/smartpqi_cam.c @@ -1140,6 +1140,7 @@ smartpqi_adjust_queue_depth(struct cam_path *path, uint32_t queue_depth) DBG_INFO("IN\n"); + memset(&crs, 0, sizeof(crs)); xpt_setup_ccb(&crs.ccb_h, path, 5); crs.ccb_h.func_code = XPT_REL_SIMQ; crs.ccb_h.flags = CAM_DEV_QFREEZE; @@ -1262,6 +1263,7 @@ register_sim(struct pqisrc_softstate *softs, int card_index) * derived from the FW. */ softs->os_specific.path = ccb->ccb_h.path; + memset(&csa, 0, sizeof(csa)); xpt_setup_ccb(&csa.ccb_h, softs->os_specific.path, 5); csa.ccb_h.func_code = XPT_SASYNC_CB; csa.event_enable = AC_FOUND_DEVICE; @@ -1294,6 +1296,7 @@ deregister_sim(struct pqisrc_softstate *softs) } + memset(&csa, 0, sizeof(csa)); xpt_setup_ccb(&csa.ccb_h, softs->os_specific.path, 5); csa.ccb_h.func_code = XPT_SASYNC_CB; csa.event_enable = 0;