git: 415c1c748d54 - main - khelp: suppress useless warning message on shutdown
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 17 Nov 2023 18:51:40 UTC
The branch main has been updated by karels:
URL: https://cgit.FreeBSD.org/src/commit/?id=415c1c748d5492e41328fedf96b6bf3c9be94595
commit 415c1c748d5492e41328fedf96b6bf3c9be94595
Author: Mike Karels <karels@FreeBSD.org>
AuthorDate: 2023-11-17 18:51:18 +0000
Commit: Mike Karels <karels@FreeBSD.org>
CommitDate: 2023-11-17 18:51:18 +0000
khelp: suppress useless warning message on shutdown
If a module (e.g. the ertt hhook for TCP) can't clean up at
shutdown, there is nothing to be done about it. In the ertt case,
cleanup is just shutting down a UMA zone, which doesn't need to be
done. Suppress EBUSY warnings on shutdown.
PR: 271677
Reviewed by: tuexen, imp
Differential Revision: https://reviews.freebsd.org/D42650
---
sys/kern/kern_khelp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/kern/kern_khelp.c b/sys/kern/kern_khelp.c
index 3d75da141b48..f8a6f3e749da 100644
--- a/sys/kern/kern_khelp.c
+++ b/sys/kern/kern_khelp.c
@@ -357,7 +357,7 @@ khelp_modevent(module_t mod, int event_type, void *data)
} else if (error == ENOENT)
/* Do nothing and allow unload if helper not in list. */
error = 0;
- else if (error == EBUSY)
+ else if (error == EBUSY && event_type != MOD_SHUTDOWN)
printf("Khelp module \"%s\" can't unload until its "
"refcount drops from %d to 0.\n", kmd->name,
kmd->helper->h_refcount);