Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Fix regression introduced in rev 1.90:



details:   https://anonhg.NetBSD.org/src/rev/fb881172cafb
branches:  trunk
changeset: 379482:fb881172cafb
user:      rin <rin%NetBSD.org@localhost>
date:      Wed Jun 02 15:43:33 2021 +0000

description:
Fix regression introduced in rev 1.90:

http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/kern/kern_ksyms.c#rev1.90

in which the last element of ksyms_symtabs is skipped by mistake.

diffstat:

 sys/kern/kern_ksyms.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 26d281065cfd -r fb881172cafb sys/kern/kern_ksyms.c
--- a/sys/kern/kern_ksyms.c     Wed Jun 02 11:32:24 2021 +0000
+++ b/sys/kern/kern_ksyms.c     Wed Jun 02 15:43:33 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_ksyms.c,v 1.93 2021/06/02 08:46:16 riastradh Exp $        */
+/*     $NetBSD: kern_ksyms.c,v 1.94 2021/06/02 15:43:33 rin Exp $      */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -73,7 +73,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_ksyms.c,v 1.93 2021/06/02 08:46:16 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_ksyms.c,v 1.94 2021/06/02 15:43:33 rin Exp $");
 
 #if defined(_KERNEL) && defined(_KERNEL_OPT)
 #include "opt_copy_symtab.h"
@@ -1087,7 +1087,7 @@ ksymsread(dev_t dev, struct uio *uio, in
         */
        filepos = sizeof(struct ksyms_hdr);
        for (st = TAILQ_FIRST(&ksyms_symtabs);
-            st != ksyms_last_snapshot;
+            st != TAILQ_NEXT(ksyms_last_snapshot, sd_queue);
             st = TAILQ_NEXT(st, sd_queue)) {
                if (__predict_false(st->sd_gone))
                        continue;
@@ -1109,7 +1109,7 @@ ksymsread(dev_t dev, struct uio *uio, in
        KASSERT(filepos <= sizeof(struct ksyms_hdr) +
            ksyms_hdr.kh_shdr[SYMTAB].sh_size);
        for (st = TAILQ_FIRST(&ksyms_symtabs);
-            st != ksyms_last_snapshot;
+            st != TAILQ_NEXT(ksyms_last_snapshot, sd_queue);
             st = TAILQ_NEXT(st, sd_queue)) {
                if (__predict_false(st->sd_gone))
                        continue;



Home | Main Index | Thread Index | Old Index