Date: Tue, 6 Dec 2016 17:09:28 +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-11@freebsd.org Subject: svn commit: r309628 - in stable/11/sys/cam: . scsi Message-ID: <201612061709.uB6H9SUT076745@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Tue Dec 6 17:09:28 2016 New Revision: 309628 URL: https://svnweb.freebsd.org/changeset/base/309628 Log: MFC r309282: Explicitly initialize cdai.flags. In SES driver uninitialized value caused unreliable physpath reporting. Modified: stable/11/sys/cam/cam_xpt.c stable/11/sys/cam/scsi/scsi_enc_ses.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/cam_xpt.c ============================================================================== --- stable/11/sys/cam/cam_xpt.c Tue Dec 6 17:06:14 2016 (r309627) +++ stable/11/sys/cam/cam_xpt.c Tue Dec 6 17:09:28 2016 (r309628) @@ -1106,6 +1106,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/11/sys/cam/scsi/scsi_enc_ses.c ============================================================================== --- stable/11/sys/cam/scsi/scsi_enc_ses.c Tue Dec 6 17:06:14 2016 (r309627) +++ stable/11/sys/cam/scsi/scsi_enc_ses.c Tue Dec 6 17:09:28 2016 (r309628) @@ -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?201612061709.uB6H9SUT076745>