Source-Changes-HG archive

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

[src/trunk]: src/sys/kern If we process the callback immediately, don't bothe...



details:   https://anonhg.NetBSD.org/src/rev/ded2582cf625
branches:  trunk
changeset: 342398:ded2582cf625
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Sun Dec 20 04:21:03 2015 +0000

description:
If we process the callback immediately, don't bother adding it to the
list of future callbacks.  We've already processed the list (and removed
all the entries), and there's nothing in the future that will process
the list again.

This avoids the possibility of leaving an entry in the list that points
to an unloaded module's former address space.

diffstat:

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

diffs (26 lines):

diff -r 409011bf1e80 -r ded2582cf625 sys/kern/subr_autoconf.c
--- a/sys/kern/subr_autoconf.c  Sun Dec 20 02:35:34 2015 +0000
+++ b/sys/kern/subr_autoconf.c  Sun Dec 20 04:21:03 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_autoconf.c,v 1.237 2015/12/07 11:38:46 pgoyette Exp $ */
+/* $NetBSD: subr_autoconf.c,v 1.238 2015/12/20 04:21:03 pgoyette 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.237 2015/12/07 11:38:46 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.238 2015/12/20 04:21:03 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -2108,6 +2108,7 @@
        if (config_finalize_done) {
                while ((*fn)(dev) != 0)
                        /* loop */ ;
+               return 0;
        }
 
        /* Ensure this isn't already on the list. */



Home | Main Index | Thread Index | Old Index