git: a1e06684e708 - stable/12 - mpr, mps: clear CCBs allocated on the stack

From: Alexander Motin <mav_at_FreeBSD.org>
Date: Wed, 01 Dec 2021 18:59:09 UTC
The branch stable/12 has been updated by mav:

URL: https://cgit.FreeBSD.org/src/commit/?id=a1e06684e708cca9eba2c3978c20a9552a55283f

commit a1e06684e708cca9eba2c3978c20a9552a55283f
Author:     Edward Tomasz Napierala <trasz@FreeBSD.org>
AuthorDate: 2021-05-21 06:42:08 +0000
Commit:     Alexander Motin <mav@FreeBSD.org>
CommitDate: 2021-12-01 18:52:36 +0000

    mpr, mps: clear CCBs allocated on the stack
    
    Reviewed By:    imp
    Sponsored by:   NetApp, Inc.
    Sponsored by:   Klara, Inc.
    Differential Revision:  https://reviews.freebsd.org/D30301
    
    (cherry picked from commit 7608b98c4394590840a53d2b38b908582253de32)
---
 sys/dev/mpr/mpr_sas.c | 1 +
 sys/dev/mps/mps_sas.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/sys/dev/mpr/mpr_sas.c b/sys/dev/mpr/mpr_sas.c
index 2fb20ebcd9d7..4d8f4ebe1673 100644
--- a/sys/dev/mpr/mpr_sas.c
+++ b/sys/dev/mpr/mpr_sas.c
@@ -3545,6 +3545,7 @@ mprsas_async(void *callback_arg, uint32_t code, struct cam_path *path,
 		}
 
 		bzero(&rcap_buf, sizeof(rcap_buf));
+		bzero(&cdai, sizeof(cdai));
 		xpt_setup_ccb(&cdai.ccb_h, path, CAM_PRIORITY_NORMAL);
 		cdai.ccb_h.func_code = XPT_DEV_ADVINFO;
 		cdai.ccb_h.flags = CAM_DIR_IN;
diff --git a/sys/dev/mps/mps_sas.c b/sys/dev/mps/mps_sas.c
index 5ba5e87137e1..ad80b0471622 100644
--- a/sys/dev/mps/mps_sas.c
+++ b/sys/dev/mps/mps_sas.c
@@ -3244,6 +3244,7 @@ mpssas_async(void *callback_arg, uint32_t code, struct cam_path *path,
 		}
 
 		bzero(&rcap_buf, sizeof(rcap_buf));
+		bzero(&cdai, sizeof(cdai));
 		xpt_setup_ccb(&cdai.ccb_h, path, CAM_PRIORITY_NORMAL);
 		cdai.ccb_h.func_code = XPT_DEV_ADVINFO;
 		cdai.ccb_h.flags = CAM_DIR_IN;