Module Name:    src
Committed By:   pgoyette
Date:           Thu Oct  4 02:24:26 UTC 2018

Modified Files:
        src/sys/sys [pgoyette-compat]: module_hook.h

Log Message:
Also in the UNSET_HOOK2 case, release the mutex before destroying it.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.5 -r1.1.2.6 src/sys/sys/module_hook.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/module_hook.h
diff -u src/sys/sys/module_hook.h:1.1.2.5 src/sys/sys/module_hook.h:1.1.2.6
--- src/sys/sys/module_hook.h:1.1.2.5	Thu Oct  4 01:56:03 2018
+++ src/sys/sys/module_hook.h	Thu Oct  4 02:24:26 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: module_hook.h,v 1.1.2.5 2018/10/04 01:56:03 pgoyette Exp $	*/
+/* $NetBSD: module_hook.h,v 1.1.2.6 2018/10/04 02:24:26 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -158,6 +158,8 @@ static void (hook ## _unset)(void)				\
 	/* Wait for existing localcount references to drain.  */\
 	localcount_drain(&hook.lc, &hook.cv, &hook.mtx);	\
 								\
+	/* Release the mutex and clean up all resources */	\
+	mutex_exit(&hook.mtx);					\
 	localcount_fini(&hook.lc);				\
 	cv_destroy(&hook.cv);					\
 	mutex_destroy(&hook.mtx);				\

Reply via email to