git: a102020bf393 - stable/13 - buf: Make bufspace_daemon_shutdown() a no-op after a panic
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 03 Mar 2023 14:28:04 UTC
The branch stable/13 has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=a102020bf39374210de95e54b83886ecedd8b166
commit a102020bf39374210de95e54b83886ecedd8b166
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2023-02-24 02:56:36 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2023-03-03 14:27:50 +0000
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)
---
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 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);