Source-Changes-HG archive

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

[src/trunk]: src/sys/kern autoconf(9): Add a comment where we risk arithmetic...



details:   https://anonhg.NetBSD.org/src/rev/0f8d8884f493
branches:  trunk
changeset: 374369:0f8d8884f493
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Fri Apr 21 17:35:43 2023 +0000

description:
autoconf(9): Add a comment where we risk arithmetic overflow.

diffstat:

 sys/kern/subr_autoconf.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 18ce1f45283a -r 0f8d8884f493 sys/kern/subr_autoconf.c
--- a/sys/kern/subr_autoconf.c  Fri Apr 21 17:31:33 2023 +0000
+++ b/sys/kern/subr_autoconf.c  Fri Apr 21 17:35:43 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_autoconf.c,v 1.309 2023/04/16 11:18:25 riastradh Exp $ */
+/* $NetBSD: subr_autoconf.c,v 1.310 2023/04/21 17:35:43 riastradh Exp $ */
 
 /*
  * Copyright (c) 1996, 2000 Christopher G. Demetriou
@@ -77,7 +77,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.309 2023/04/16 11:18:25 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.310 2023/04/21 17:35:43 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -1335,6 +1335,7 @@ config_makeroom(int n, struct cfdriver *
        KASSERT(mutex_owned(&alldevs_lock));
        alldevs_nwrite++;
 
+       /* XXX arithmetic overflow */
        for (nndevs = MAX(4, cd->cd_ndevs); nndevs <= n; nndevs += nndevs)
                ;
 



Home | Main Index | Thread Index | Old Index