From owner-svn-src-all@freebsd.org Thu Oct 8 18:35:22 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7B9B042EF08; Thu, 8 Oct 2020 18:35:22 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C6fyf2kgpz4MxS; Thu, 8 Oct 2020 18:35:22 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from [192.168.1.10] (c-98-207-126-143.hsd1.ca.comcast.net [98.207.126.143]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: rpokala) by smtp.freebsd.org (Postfix) with ESMTPSA id B24BB2313C; Thu, 8 Oct 2020 18:35:21 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/16.41.20091302 Date: Thu, 08 Oct 2020 11:35:18 -0700 Subject: Re: svn commit: r366543 - head/sys/kern From: Ravi Pokala To: Mitchell Horne , , , Message-ID: <3C85CF6B-CB67-4446-879B-21FFB52A1AF4@panasas.com> Thread-Topic: svn commit: r366543 - head/sys/kern References: <202010081829.098ITHNE065741@repo.freebsd.org> In-Reply-To: <202010081829.098ITHNE065741@repo.freebsd.org> Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2020 18:35:22 -0000 -----Original Message----- From: on behalf of Mitchell Horne Date: 2020-10-08, Thursday at 11:29 To: , , 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++;