From 9d7cc536e261a7d207476115dac6058c38f469bd Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Thu, 23 Feb 2023 21:56:36 -0500 Subject: [PATCH] buf: Make bufspace_daemon_shutdown() a no-op after a panic This function doesn't need to do anything in that context, and calling wakeup() can lead to recursive panics. Discussed with: mhorne MFC after: 1 week --- sys/kern/vfs_bio.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index abc3eea9be4e..b40ee382c42a 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -766,6 +766,9 @@ bufspace_daemon_shutdown(void *arg, int howto __unused) struct bufdomain *bd = arg; int error; + if (KERNEL_PANICKED()) + return; + BD_RUN_LOCK(bd); bd->bd_shutdown = true; wakeup(&bd->bd_running);