aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2023-02-24 02:56:36 +0000
committerMark Johnston <markj@FreeBSD.org>2023-03-03 14:27:50 +0000
commita102020bf39374210de95e54b83886ecedd8b166 (patch)
tree6c1f023102f672051c36f285fb9031ae9aefc54f
parent947344774cf3d405d0eae0d132fc2d7f63dc6330 (diff)
downloadsrc-a102020bf39374210de95e54b83886ecedd8b166.tar.gz
src-a102020bf39374210de95e54b83886ecedd8b166.zip
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 (cherry picked from commit 9d7cc536e261a7d207476115dac6058c38f469bd)
-rw-r--r--sys/kern/vfs_bio.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index 6a479ed335ef..98047f161077 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -764,6 +764,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);