Source-Changes-HG archive

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

[src/trunk]: src/sys/kern ksem_sysinit(): more lossage.



details:   https://anonhg.NetBSD.org/src/rev/35dd09888fb6
branches:  trunk
changeset: 967673:35dd09888fb6
user:      ad <ad%NetBSD.org@localhost>
date:      Tue Dec 17 18:16:05 2019 +0000

description:
ksem_sysinit(): more lossage.

diffstat:

 sys/kern/uipc_sem.c |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (42 lines):

diff -r a2941eae79bb -r 35dd09888fb6 sys/kern/uipc_sem.c
--- a/sys/kern/uipc_sem.c       Tue Dec 17 18:10:36 2019 +0000
+++ b/sys/kern/uipc_sem.c       Tue Dec 17 18:16:05 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uipc_sem.c,v 1.57 2019/12/17 18:10:36 ad Exp $ */
+/*     $NetBSD: uipc_sem.c,v 1.58 2019/12/17 18:16:05 ad Exp $ */
 
 /*-
  * Copyright (c) 2011, 2019 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_sem.c,v 1.57 2019/12/17 18:10:36 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_sem.c,v 1.58 2019/12/17 18:16:05 ad Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -204,11 +204,6 @@
            true, &ksem_pshared_hashmask);
        KASSERT(ksem_pshared_hashtab != NULL);
 
-       error = syscall_establish(NULL, ksem_syscalls);
-       if (error) {
-               (void)ksem_sysfini(false);
-       }
-
        ksem_listener = kauth_listen_scope(KAUTH_SCOPE_SYSTEM,
            ksem_listener_cb, NULL);
 
@@ -235,6 +230,11 @@
                        NULL, 0, &nsems, 0,
                        CTL_CREATE, CTL_EOL);
 
+       error = syscall_establish(NULL, ksem_syscalls);
+       if (error) {
+               (void)ksem_sysfini(false);
+       }
+
        return error;
 }
 



Home | Main Index | Thread Index | Old Index