svn commit: r309282 - in head/sys/cam: . scsi
Alexander Motin
mav at FreeBSD.org
Tue Nov 29 11:13:44 UTC 2016
Author: mav
Date: Tue Nov 29 11:13:43 2016
New Revision: 309282
URL: https://svnweb.freebsd.org/changeset/base/309282
Log:
Explicitly initialize cdai.flags.
In SES driver uninitialized value caused unreliable physpath reporting.
MFC after: 1 week
Sponsored by: iXsystems, Inc.
Modified:
head/sys/cam/cam_xpt.c
head/sys/cam/scsi/scsi_enc_ses.c
Modified: head/sys/cam/cam_xpt.c
==============================================================================
--- head/sys/cam/cam_xpt.c Tue Nov 29 10:43:58 2016 (r309281)
+++ head/sys/cam/cam_xpt.c Tue Nov 29 11:13:43 2016 (r309282)
@@ -1124,6 +1124,7 @@ xpt_getattr(char *buf, size_t len, const
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"))
Modified: head/sys/cam/scsi/scsi_enc_ses.c
==============================================================================
--- head/sys/cam/scsi/scsi_enc_ses.c Tue Nov 29 10:43:58 2016 (r309281)
+++ head/sys/cam/scsi/scsi_enc_ses.c Tue Nov 29 11:13:43 2016 (r309282)
@@ -1066,6 +1066,7 @@ ses_set_physpath(enc_softc_t *enc, enc_e
*/
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);
More information about the svn-src-all
mailing list