Source-Changes-HG archive

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

[src/trunk]: src/external/cddl/osnet/sys/kern Don't allow module to init befo...



details:   https://anonhg.NetBSD.org/src/rev/d4ba6939e28c
branches:  trunk
changeset: 446652:d4ba6939e28c
user:      hannken <hannken%NetBSD.org@localhost>
date:      Thu Dec 13 10:19:47 2018 +0000

description:
Don't allow module to init before mp_online.

diffstat:

 external/cddl/osnet/sys/kern/mod.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r fb9c50a17808 -r d4ba6939e28c external/cddl/osnet/sys/kern/mod.c
--- a/external/cddl/osnet/sys/kern/mod.c        Thu Dec 13 09:20:05 2018 +0000
+++ b/external/cddl/osnet/sys/kern/mod.c        Thu Dec 13 10:19:47 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mod.c,v 1.3 2018/05/28 21:05:09 chs Exp $      */
+/*     $NetBSD: mod.c,v 1.4 2018/12/13 10:19:47 hannken Exp $  */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mod.c,v 1.3 2018/05/28 21:05:09 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mod.c,v 1.4 2018/12/13 10:19:47 hannken Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -49,6 +49,9 @@
 
        switch (cmd) {
        case MODULE_CMD_INIT:
+               if (!mp_online)
+                       return EAGAIN;
+
                opensolaris_utsname_init();
                callb_init(NULL);
                taskq_init();



Home | Main Index | Thread Index | Old Index