Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Allow equality in this assertion.



details:   https://anonhg.NetBSD.org/src/rev/1ce6efb16c98
branches:  trunk
changeset: 1005343:1ce6efb16c98
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Thu Dec 05 03:21:08 2019 +0000

description:
Allow equality in this assertion.

This can happen if we lose the race mentioned in percpu_cpu_swap.

diffstat:

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

diffs (27 lines):

diff -r 21209627052b -r 1ce6efb16c98 sys/kern/subr_percpu.c
--- a/sys/kern/subr_percpu.c    Thu Dec 05 03:15:20 2019 +0000
+++ b/sys/kern/subr_percpu.c    Thu Dec 05 03:21:08 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: subr_percpu.c,v 1.19 2019/09/18 15:33:32 kamil Exp $   */
+/*     $NetBSD: subr_percpu.c,v 1.20 2019/12/05 03:21:08 riastradh Exp $       */
 
 /*-
  * Copyright (c)2007,2008 YAMAMOTO Takashi,
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_percpu.c,v 1.19 2019/09/18 15:33:32 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_percpu.c,v 1.20 2019/12/05 03:21:08 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/cpu.h>
@@ -149,7 +149,7 @@
                        where = xc_unicast(0, percpu_cpu_swap, ci, &pcc, ci);
                        xc_wait(where);
                }
-               KASSERT(pcc.pcc_size < size);
+               KASSERT(pcc.pcc_size <= size);
                if (pcc.pcc_data != NULL) {
                        kmem_free(pcc.pcc_data, pcc.pcc_size);
                }



Home | Main Index | Thread Index | Old Index