Date: Tue, 08 Sep 2020 12:01:24 +0000 From: "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net> To: "Andriy Gapon" <avg@FreeBSD.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r365445 - head/sys/cam/mmc Message-ID: <E1BB484B-752F-4556-9EEF-9E5EECCC7382@lists.zabbadoz.net> In-Reply-To: <34826ee7-12a9-d309-1fee-cd2e95744603@FreeBSD.org> References: <202009080546.0885kAgk006783@repo.freebsd.org> <34826ee7-12a9-d309-1fee-cd2e95744603@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 8 Sep 2020, at 7:10, Andriy Gapon wrote: > On 08/09/2020 08:46, Andriy Gapon wrote: >> Author: avg >> Date: Tue Sep 8 05:46:10 2020 >> New Revision: 365445 >> URL: https://svnweb.freebsd.org/changeset/base/365445 >> >> Log: >> mmc_da: make sure that part_index is not used uninitialized in = >> sddastart > [snip] >> Modified: head/sys/cam/mmc/mmc_da.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/sys/cam/mmc/mmc_da.c Tue Sep 8 04:44:37 2020 (r365444) >> +++ head/sys/cam/mmc/mmc_da.c Tue Sep 8 05:46:10 2020 (r365445) >> @@ -1808,6 +1808,7 @@ sddastart(struct cam_periph *periph, union ccb = >> *start_ >> } >> >> /* Find partition that has outstanding commands. Prefer current = >> partition. */ >> + part_index =3D softc->part_curr; >> part =3D softc->part[softc->part_curr]; >> bp =3D bioq_first(&part->bio_queue); >> if (bp =3D=3D NULL) { >> > > One thing that concerns me is that it was obvious (to a human) that = > part_index > could be used uninitialized if bp was not NULL. > Yet, there was no warning or error from the compiler when I built that = > code for > armv7. > > I wonder if we disable some relevant warnings for that architecture. > Or if the compiler (clang 11) could not figure that out. I had just finished dissecting my hang in g_waitidle on boot on the = nanopi-m4v2/arm64 this morning and when I saw your commits as I came = back home .. guess what: 364132 boots 364219 boots 364263 boots 364274 boots 364283 boots 364284 no << = https://svnweb.freebsd.org/base?view=3Drevision&revision=3D364284 (clang= = merge) 364285 no 364307 no 364482 no 364657 no 365335 no 365364 no 365448 boots /bz
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1BB484B-752F-4556-9EEF-9E5EECCC7382>