Module Name: src Committed By: pgoyette Date: Thu Oct 4 01:56:03 UTC 2018
Modified Files: src/sys/sys [pgoyette-compat]: module_hook.h Log Message: Grab the mutex for UNSET_HOOK2 (fixed previously for UNSET_HOOK) To generate a diff of this commit: cvs rdiff -u -r1.1.2.4 -r1.1.2.5 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.4 src/sys/sys/module_hook.h:1.1.2.5 --- src/sys/sys/module_hook.h:1.1.2.4 Sat Sep 29 21:36:15 2018 +++ src/sys/sys/module_hook.h Thu Oct 4 01:56:03 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: module_hook.h,v 1.1.2.4 2018/09/29 21:36:15 pgoyette Exp $ */ +/* $NetBSD: module_hook.h,v 1.1.2.5 2018/10/04 01:56:03 pgoyette Exp $ */ /*- * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -146,6 +146,9 @@ static void (hook ## _unset)(void) \ KASSERT(hook.f1); \ KASSERT(hook.f2); \ \ + /* Grab the mutex */ \ + mutex_enter(&hook.mtx); \ + \ /* Prevent new localcount_acquire calls. */ \ hook.hooked = false; \ \