Explicitly initialize cdai.flags.
In SES driver uninitialized value caused unreliable physpath reporting. MFC after: 1 week Sponsored by: iXsystems, Inc.
This commit is contained in:
parent
c99ebe6c01
commit
ab4327bb3f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=309282
@ -1124,6 +1124,7 @@ xpt_getattr(char *buf, size_t len, const char *attr, struct cam_path *path)
|
||||
memset(&cdai, 0, sizeof(cdai));
|
||||
xpt_setup_ccb(&cdai.ccb_h, path, CAM_PRIORITY_NORMAL);
|
||||
cdai.ccb_h.func_code = XPT_DEV_ADVINFO;
|
||||
cdai.flags = CDAI_FLAG_NONE;
|
||||
cdai.bufsiz = len;
|
||||
|
||||
if (!strcmp(attr, "GEOM::ident"))
|
||||
|
@ -1066,6 +1066,7 @@ ses_set_physpath(enc_softc_t *enc, enc_element_t *elm,
|
||||
*/
|
||||
xpt_setup_ccb(&cdai.ccb_h, enc->periph->path, CAM_PRIORITY_NORMAL);
|
||||
cdai.ccb_h.func_code = XPT_DEV_ADVINFO;
|
||||
cdai.flags = CDAI_FLAG_NONE;
|
||||
cdai.buftype = CDAI_TYPE_SCSI_DEVID;
|
||||
cdai.bufsiz = CAM_SCSI_DEVID_MAXLEN;
|
||||
cdai.buf = devid = malloc(cdai.bufsiz, M_SCSIENC, M_WAITOK|M_ZERO);
|
||||
|
Loading…
Reference in New Issue
Block a user