Source-Changes-HG archive

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

[src/trunk]: src/sys/net/npf npf: Don't stop early after sleeping and before ...



details:   https://anonhg.NetBSD.org/src/rev/52320aff3b99
branches:  trunk
changeset: 943142:52320aff3b99
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Thu Aug 27 18:49:36 2020 +0000

description:
npf: Don't stop early after sleeping and before processing instances.

We already check winfo->exit below, after processing instances and
before sleeping again.

Candidate fix for:

panic: kernel diagnostic assertion "LIST_EMPTY(&winfo->instances)" failed: file "/home/riastradh/netbsd/current/src/sys/rump/net/lib/libnpf/../../../..//net/npf/npf_worker.c", line 300 NPF instances 
must be discharged before the npfk_sysfini() call

diffstat:

 sys/net/npf/npf_worker.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r 39d232b053e2 -r 52320aff3b99 sys/net/npf/npf_worker.c
--- a/sys/net/npf/npf_worker.c  Thu Aug 27 16:35:13 2020 +0000
+++ b/sys/net/npf/npf_worker.c  Thu Aug 27 18:49:36 2020 +0000
@@ -29,7 +29,7 @@
 
 #ifdef _KERNEL
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: npf_worker.c,v 1.9 2020/05/30 20:54:54 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: npf_worker.c,v 1.10 2020/08/27 18:49:36 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -271,7 +271,7 @@
        npf_t *npf;
 
        mutex_enter(&winfo->lock);
-       while (!winfo->exit) {
+       for (;;) {
                unsigned wait_time = NPF_GC_MAXWAIT;
 
                /*



Home | Main Index | Thread Index | Old Index