Date: Tue, 29 Nov 2016 11:13:43 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309282 - in head/sys/cam: . scsi Message-ID: <201611291113.uATBDh1T013298@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201611291113.uATBDh1T013298>