Date: Tue, 6 Dec 2016 17:10:17 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r309629 - in stable/10/sys/cam: . scsi Message-ID: <201612061710.uB6HAH6f076849@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Tue Dec 6 17:10:17 2016 New Revision: 309629 URL: https://svnweb.freebsd.org/changeset/base/309629 Log: MFC r309282: Explicitly initialize cdai.flags. In SES driver uninitialized value caused unreliable physpath reporting. Modified: stable/10/sys/cam/cam_xpt.c stable/10/sys/cam/scsi/scsi_enc_ses.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/cam_xpt.c ============================================================================== --- stable/10/sys/cam/cam_xpt.c Tue Dec 6 17:09:28 2016 (r309628) +++ stable/10/sys/cam/cam_xpt.c Tue Dec 6 17:10:17 2016 (r309629) @@ -1105,6 +1105,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: stable/10/sys/cam/scsi/scsi_enc_ses.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_enc_ses.c Tue Dec 6 17:09:28 2016 (r309628) +++ stable/10/sys/cam/scsi/scsi_enc_ses.c Tue Dec 6 17:10:17 2016 (r309629) @@ -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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201612061710.uB6HAH6f076849>