Source-Changes-HG archive

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

[src/trunk]: src/sys/kern PR/53998: Joel Bertrand: Return ENOSPC when SEM_NSE...



details:   https://anonhg.NetBSD.org/src/rev/0c059e590888
branches:  trunk
changeset: 997096:0c059e590888
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Feb 21 21:49:23 2019 +0000

description:
PR/53998: Joel Bertrand: Return ENOSPC when SEM_NSEMS_MAX is exceeded
instead of -1.

diffstat:

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

diffs (27 lines):

diff -r 59e4ce800a50 -r 0c059e590888 sys/kern/uipc_sem.c
--- a/sys/kern/uipc_sem.c       Thu Feb 21 21:34:05 2019 +0000
+++ b/sys/kern/uipc_sem.c       Thu Feb 21 21:49:23 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uipc_sem.c,v 1.53 2019/02/05 07:14:32 thorpej Exp $    */
+/*     $NetBSD: uipc_sem.c,v 1.54 2019/02/21 21:49:23 christos 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.53 2019/02/05 07:14:32 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_sem.c,v 1.54 2019/02/21 21:49:23 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -471,7 +471,7 @@
                atomic_dec_uint(&l->l_proc->p_nsems);
                if (kname != NULL)
                        kmem_free(kname, len);
-               return -1;
+               return ENOSPC;
        }
 
        ks = kmem_zalloc(sizeof(ksem_t), KM_SLEEP);



Home | Main Index | Thread Index | Old Index