Date: Thu, 08 Oct 2020 11:35:18 -0700 From: Ravi Pokala <rpokala@freebsd.org> To: Mitchell Horne <mhorne@FreeBSD.org>, <src-committers@freebsd.org>, <svn-src-all@freebsd.org>, <svn-src-head@freebsd.org> Subject: Re: svn commit: r366543 - head/sys/kern Message-ID: <3C85CF6B-CB67-4446-879B-21FFB52A1AF4@panasas.com> In-Reply-To: <202010081829.098ITHNE065741@repo.freebsd.org> References: <202010081829.098ITHNE065741@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
-----Original Message-----
From: <owner-src-committers@freebsd.org> on behalf of Mitchell Horne <mhorne@FreeBSD.org>
Date: 2020-10-08, Thursday at 11:29
To: <src-committers@freebsd.org>, <svn-src-all@freebsd.org>, <svn-src-head@freebsd.org>
Subject: svn commit: r366543 - head/sys/kern
Author: mhorne
Date: Thu Oct 8 18:29:17 2020
New Revision: 366543
URL: https://svnweb.freebsd.org/changeset/base/366543
Log:
Fix a loop condition
The correct way to identify the end of the metadata is two adjacent
entries set to zero/MODINFO_END. I made a typo and this was checking the
first entry twice.
Reported by: rpokala
Thanks! :-)
Ravi (rpokala@)
Sponsored by: NetApp, Inc.
Sponsored by: Klara, Inc.
Modified:
head/sys/kern/subr_module.c
Modified: head/sys/kern/subr_module.c
==============================================================================
--- head/sys/kern/subr_module.c Thu Oct 8 18:02:05 2020 (r366542)
+++ head/sys/kern/subr_module.c Thu Oct 8 18:29:17 2020 (r366543)
@@ -496,7 +496,7 @@ preload_dump_internal(struct sbuf *sbp)
*/
bptr = (uint32_t *)preload_metadata;
sbuf_putc(sbp, '\n');
- while (bptr[0] != MODINFO_END || bptr[0] != MODINFO_END) {
+ while (bptr[0] != MODINFO_END || bptr[1] != MODINFO_END) {
sbuf_printf(sbp, " %p:\n", bptr);
type = *bptr++;
len = *bptr++;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C85CF6B-CB67-4446-879B-21FFB52A1AF4>
