Source-Changes-HG archive

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

[src/trunk]: src/sys/external/bsd/common/linux Sprinkle in another assertion ...



details:   https://anonhg.NetBSD.org/src/rev/193a08526414
branches:  trunk
changeset: 1027927:193a08526414
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 01:17:39 2021 +0000

description:
Sprinkle in another assertion for good measure.

diffstat:

 sys/external/bsd/common/linux/linux_tasklet.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r e2e28207ed49 -r 193a08526414 sys/external/bsd/common/linux/linux_tasklet.c
--- a/sys/external/bsd/common/linux/linux_tasklet.c     Sun Dec 19 01:17:31 2021 +0000
+++ b/sys/external/bsd/common/linux/linux_tasklet.c     Sun Dec 19 01:17:39 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_tasklet.c,v 1.1 2021/12/19 01:17:14 riastradh Exp $      */
+/*     $NetBSD: linux_tasklet.c,v 1.2 2021/12/19 01:17:39 riastradh Exp $      */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_tasklet.c,v 1.1 2021/12/19 01:17:14 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_tasklet.c,v 1.2 2021/12/19 01:17:39 riastradh Exp $");
 
 #include <sys/types.h>
 #include <sys/atomic.h>
@@ -382,6 +382,7 @@
        /* Increment the disable count.  */
        disablecount = atomic_inc_uint_nv(&tasklet->tl_disablecount);
        KASSERT(disablecount < UINT_MAX);
+       KASSERT(disablecount != 0);
 
        /* Wait for it to finish running, if it was running.  */
        while (tasklet->tl_state & TASKLET_RUNNING)



Home | Main Index | Thread Index | Old Index