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
This commit is contained in:
riastradh 2020-08-27 18:49:36 +00:00
parent 7f9d4e51bf
commit 82242297a7

View File

@ -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_worker(void *arg)
npf_t *npf;
mutex_enter(&winfo->lock);
while (!winfo->exit) {
for (;;) {
unsigned wait_time = NPF_GC_MAXWAIT;
/*