Thu Aug 27 18:49:36 2020 UTC ()
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


(riastradh)
diff -r1.9 -r1.10 src/sys/net/npf/npf_worker.c

cvs diff -r1.9 -r1.10 src/sys/net/npf/npf_worker.c (expand / switch to context diff)
--- src/sys/net/npf/npf_worker.c 2020/05/30 20:54:54 1.9
+++ src/sys/net/npf/npf_worker.c 2020/08/27 18:49:36 1.10
@@ -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;
 
 		/*