git: d39aac796bd2 - main - pms(4): clear CCBs allocated on the stack
Edward Tomasz Napierala
trasz at FreeBSD.org
Fri May 21 06:38:31 UTC 2021
The branch main has been updated by trasz:
URL: https://cgit.FreeBSD.org/src/commit/?id=d39aac796bd20692919223b1bbec6ce6b2779e1a
commit d39aac796bd20692919223b1bbec6ce6b2779e1a
Author: Edward Tomasz Napierala <trasz at FreeBSD.org>
AuthorDate: 2021-05-21 06:28:46 +0000
Commit: Edward Tomasz Napierala <trasz at FreeBSD.org>
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;
More information about the dev-commits-src-all
mailing list