Source-Changes-HG archive

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

[src/netbsd-9]: src/sys/kern Pull up following revision(s) (requested by chs ...



details:   https://anonhg.NetBSD.org/src/rev/9c2197908b3c
branches:  netbsd-9
changeset: 745654:9c2197908b3c
user:      martin <martin%NetBSD.org@localhost>
date:      Sun Mar 08 11:04:43 2020 +0000

description:
Pull up following revision(s) (requested by chs in ticket #766):

        sys/kern/subr_pool.c: revision 1.265

fix assertions about when it is ok for pool_get() to return NULL.

diffstat:

 sys/kern/subr_pool.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 71ec1c2ce45a -r 9c2197908b3c sys/kern/subr_pool.c
--- a/sys/kern/subr_pool.c      Sun Mar 08 11:03:19 2020 +0000
+++ b/sys/kern/subr_pool.c      Sun Mar 08 11:04:43 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: subr_pool.c,v 1.252.2.2 2019/09/01 10:56:00 martin Exp $       */
+/*     $NetBSD: subr_pool.c,v 1.252.2.3 2020/03/08 11:04:43 martin Exp $       */
 
 /*
  * Copyright (c) 1997, 1999, 2000, 2002, 2007, 2008, 2010, 2014, 2015, 2018
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.252.2.2 2019/09/01 10:56:00 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.252.2.3 2020/03/08 11:04:43 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -1062,7 +1062,7 @@
 
                        pp->pr_nfail++;
                        mutex_exit(&pp->pr_lock);
-                       KASSERT((flags & (PR_WAITOK|PR_NOWAIT)) == PR_NOWAIT);
+                       KASSERT((flags & (PR_NOWAIT|PR_LIMITFAIL)) != 0);
                        return NULL;
                }
 
@@ -2422,7 +2422,7 @@
        object = pool_get(&pc->pc_pool, flags);
        *objectp = object;
        if (__predict_false(object == NULL)) {
-               KASSERT((flags & (PR_WAITOK|PR_NOWAIT)) == PR_NOWAIT);
+               KASSERT((flags & (PR_NOWAIT|PR_LIMITFAIL)) != 0);
                return false;
        }
 



Home | Main Index | Thread Index | Old Index