From a08f9baa7620a6643f12f0b847c2bbab41a0b255 Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Wed, 18 Apr 2012 11:58:03 -0400 Subject: [PATCH] macos: lock module against unload during shutdown during shutdown, once umount finished, it was possible to unload the module before shutdown completed. fix that. Change-Id: I7eae5210ec9553fa862d96148f963dcdfee79c4b Reviewed-on: http://gerrit.openafs.org/7245 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- src/afs/DARWIN/osi_module.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/afs/DARWIN/osi_module.c b/src/afs/DARWIN/osi_module.c index 020518bb01..f254ccf512 100644 --- a/src/afs/DARWIN/osi_module.c +++ b/src/afs/DARWIN/osi_module.c @@ -115,6 +115,8 @@ afs_modunload(struct kmod_info * kmod_info, void *data) { if (afs_globalVFS) return KERN_FAILURE; + if ((afs_initState != 0) || (afs_shuttingdown)) + return KERN_FAILURE; #ifdef AFS_DARWIN80_ENV if (vfs_fsremove(afs_vfstable)) return KERN_FAILURE;