Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/pgoyette-compat]: src/sys/sys Grab the mutex for UNSET_HOOK2 (fixed prev...



details:   https://anonhg.NetBSD.org/src/rev/c7d7a4061803
branches:  pgoyette-compat
changeset: 830860:c7d7a4061803
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Thu Oct 04 01:56:03 2018 +0000

description:
Grab the mutex for UNSET_HOOK2 (fixed previously for UNSET_HOOK)

diffstat:

 sys/sys/module_hook.h |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (19 lines):

diff -r 8624d8cd439d -r c7d7a4061803 sys/sys/module_hook.h
--- a/sys/sys/module_hook.h     Thu Oct 04 01:55:17 2018 +0000
+++ b/sys/sys/module_hook.h     Thu Oct 04 01:56:03 2018 +0000
@@ -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 @@
        KASSERT(hook.f1);                                       \
        KASSERT(hook.f2);                                       \
                                                                \
+       /* Grab the mutex */                                    \
+       mutex_enter(&hook.mtx);                                 \
+                                                               \
        /* Prevent new localcount_acquire calls.  */            \
        hook.hooked = false;                                    \
                                                                \



Home | Main Index | Thread Index | Old Index