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 some assertions.



details:   https://anonhg.NetBSD.org/src/rev/731e70af7ece
branches:  trunk
changeset: 366348:731e70af7ece
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 14:59:58 2018 +0000

description:
Sprinkle some assertions.

diffstat:

 sys/external/bsd/common/linux/linux_work.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (34 lines):

diff -r 245f51950118 -r 731e70af7ece sys/external/bsd/common/linux/linux_work.c
--- a/sys/external/bsd/common/linux/linux_work.c        Mon Aug 27 14:59:20 2018 +0000
+++ b/sys/external/bsd/common/linux/linux_work.c        Mon Aug 27 14:59:58 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_work.c,v 1.17 2018/08/27 14:59:20 riastradh Exp $        */
+/*     $NetBSD: linux_work.c,v 1.18 2018/08/27 14:59:58 riastradh Exp $        */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_work.c,v 1.17 2018/08/27 14:59:20 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_work.c,v 1.18 2018/08/27 14:59:58 riastradh Exp $");
 
 #include <sys/types.h>
 #include <sys/atomic.h>
@@ -230,6 +230,7 @@
                while (!TAILQ_EMPTY(&tmp)) {
                        struct work_struct *const work = TAILQ_FIRST(&tmp);
 
+                       KASSERT(work->work_queue == wq);
                        TAILQ_REMOVE(&tmp, work, work_entry);
                        KASSERT(wq->wq_current_work == NULL);
                        wq->wq_current_work = work;
@@ -266,6 +267,7 @@
        KASSERT(wq != NULL);
 
        mutex_enter(&wq->wq_lock);
+       KASSERT(dw->work.work_queue == wq);
        switch (dw->dw_state) {
        case DELAYED_WORK_IDLE:
                panic("delayed work callout uninitialized: %p", dw);



Home | Main Index | Thread Index | Old Index