Module Name:    src
Committed By:   pgoyette
Date:           Sun Dec 20 04:21:03 UTC 2015

Modified Files:
        src/sys/kern: subr_autoconf.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.237 -r1.238 src/sys/kern/subr_autoconf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/subr_autoconf.c
diff -u src/sys/kern/subr_autoconf.c:1.237 src/sys/kern/subr_autoconf.c:1.238
--- src/sys/kern/subr_autoconf.c:1.237	Mon Dec  7 11:38:46 2015
+++ src/sys/kern/subr_autoconf.c	Sun Dec 20 04:21:03 2015
@@ -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 @@ config_finalize_register(device_t dev, i
 	if (config_finalize_done) {
 		while ((*fn)(dev) != 0)
 			/* loop */ ;
+		return 0;
 	}
 
 	/* Ensure this isn't already on the list. */

Reply via email to