Source-Changes-HG archive

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

[src/pgoyette-compat]: src/sys/sys Also in the UNSET_HOOK2 case, release the ...



details:   https://anonhg.NetBSD.org/src/rev/f92eb81ac03e
branches:  pgoyette-compat
changeset: 830862:f92eb81ac03e
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Thu Oct 04 02:24:26 2018 +0000

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

diffstat:

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

diffs (18 lines):

diff -r 0c847d0905a2 -r f92eb81ac03e sys/sys/module_hook.h
--- a/sys/sys/module_hook.h     Thu Oct 04 02:20:29 2018 +0000
+++ b/sys/sys/module_hook.h     Thu Oct 04 02:24:26 2018 +0000
@@ -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 @@
        /* 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);                               \



Home | Main Index | Thread Index | Old Index