Source-Changes-HG archive

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

[src/trunk]: src/sys/opencrypto relinguish our lock while we are autoloading.



details:   https://anonhg.NetBSD.org/src/rev/840bc46fc82f
branches:  trunk
changeset: 461841:840bc46fc82f
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Jul 11 23:28:17 2019 +0000

description:
relinguish our lock while we are autoloading.

diffstat:

 sys/opencrypto/crypto.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r 4f30e6cd36d0 -r 840bc46fc82f sys/opencrypto/crypto.c
--- a/sys/opencrypto/crypto.c   Thu Jul 11 23:27:24 2019 +0000
+++ b/sys/opencrypto/crypto.c   Thu Jul 11 23:28:17 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: crypto.c,v 1.107 2019/06/13 02:07:31 christos Exp $ */
+/*     $NetBSD: crypto.c,v 1.108 2019/07/11 23:28:17 christos Exp $ */
 /*     $FreeBSD: src/sys/opencrypto/crypto.c,v 1.4.2.5 2003/02/26 00:14:05 sam Exp $   */
 /*     $OpenBSD: crypto.c,v 1.41 2002/07/17 23:52:38 art Exp $ */
 
@@ -53,7 +53,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: crypto.c,v 1.107 2019/06/13 02:07:31 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: crypto.c,v 1.108 2019/07/11 23:28:17 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/reboot.h>
@@ -812,7 +812,9 @@
        }
 
        if (best == NULL && hard == 0 && error == 0) {
+               mutex_exit(&crypto_drv_mtx);
                error = module_autoload("swcrypto", MODULE_CLASS_DRIVER);
+               mutex_enter(&crypto_drv_mtx);
                if (error == 0) {
                        error = EINVAL;
                        goto again;



Home | Main Index | Thread Index | Old Index