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