From owner-dev-commits-src-main@freebsd.org Fri May 21 06:38:31 2021 Return-Path: Delivered-To: dev-commits-src-main@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 D8603652551; Fri, 21 May 2021 06:38: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 4FmcPg5nLwz4sS5; Fri, 21 May 2021 06:38: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 AEBD2476B; Fri, 21 May 2021 06:38: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 14L6cVAN043266; Fri, 21 May 2021 06:38:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 14L6cVh3043265; Fri, 21 May 2021 06:38:31 GMT (envelope-from git) Date: Fri, 21 May 2021 06:38:31 GMT Message-Id: <202105210638.14L6cVh3043265@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Edward Tomasz Napierala Subject: git: d39aac796bd2 - main - pms(4): clear CCBs allocated on the stack MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: trasz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d39aac796bd20692919223b1bbec6ce6b2779e1a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2021 06:38:31 -0000 The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=d39aac796bd20692919223b1bbec6ce6b2779e1a commit d39aac796bd20692919223b1bbec6ce6b2779e1a Author: Edward Tomasz Napierala AuthorDate: 2021-05-21 06:28:46 +0000 Commit: Edward Tomasz Napierala CommitDate: 2021-05-21 06:29:23 +0000 pms(4): clear CCBs allocated on the stack Reviewed By: imp Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D30300 --- sys/dev/pms/freebsd/driver/ini/src/agtiapi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c b/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c index a2b20c9e9264..a4efec572864 100644 --- a/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c +++ b/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c @@ -470,6 +470,7 @@ int agtiapi_getCardInfo ( struct agtiapi_softc *pCard, void agtiapi_adjust_queue_depth(struct cam_path *path, bit32 QueueDepth) { struct ccb_relsim crs; + 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; @@ -929,6 +930,7 @@ static int agtiapi_attach( device_t devx ) return( EIO ); } pmsc->path = ccb->ccb_h.path; + memset(&csa, 0, sizeof(csa)); xpt_setup_ccb(&csa.ccb_h, pmsc->path, 5); csa.ccb_h.func_code = XPT_SASYNC_CB; csa.event_enable = AC_FOUND_DEVICE; @@ -6545,6 +6547,7 @@ int agtiapi_ReleaseHBA( device_t dev ) if (pCard->sim != NULL) { mtx_lock(&thisCardInst->pmIOLock); + memset(&csa, 0, sizeof(csa)); xpt_setup_ccb(&csa.ccb_h, pCard->path, 5); csa.ccb_h.func_code = XPT_SASYNC_CB; csa.event_enable = 0;