diff options
| -rw-r--r-- | sys/opencrypto/crypto.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/sys/opencrypto/crypto.c b/sys/opencrypto/crypto.c index b81afbf5b5d..2e7bef5ba14 100644 --- a/sys/opencrypto/crypto.c +++ b/sys/opencrypto/crypto.c @@ -1,4 +1,4 @@ -/* $NetBSD: crypto.c,v 1.113 2020/03/16 21:20:12 pgoyette Exp $ */ +/* $NetBSD: crypto.c,v 1.114 2020/04/08 15:27:18 pgoyette 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.113 2020/03/16 21:20:12 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: crypto.c,v 1.114 2020/04/08 15:27:18 pgoyette Exp $"); #include <sys/param.h> #include <sys/reboot.h> @@ -383,7 +383,8 @@ int crypto_userasymcrypto = 1; /* userland may do asym crypto reqs */ */ int crypto_devallowsoft = 1; /* only use hardware crypto */ -SYSCTL_SETUP(sysctl_opencrypto_setup, "opencrypto sysctl") +static void +sysctl_opencrypto_setup(struct sysctllog **clog) { const struct sysctlnode *ocnode; const struct sysctlnode *retqnode, *retkqnode; @@ -518,6 +519,8 @@ static struct cryptostats cryptostats; static int crypto_timing = 0; #endif +static struct sysctllog *sysctl_opencrypto_clog; + static void crypto_crp_ret_qs_init(void) { @@ -584,6 +587,8 @@ crypto_init0(void) return crypto_destroy(false); } + sysctl_opencrypto_setup(&sysctl_opencrypto_clog); + return 0; } @@ -650,6 +655,9 @@ crypto_destroy(bool exit_kthread) } } + if (sysctl_opencrypto_clog != NULL) + sysctl_teardown(&sysctl_opencrypto_clog); + if (crypto_ret_si != NULL) softint_disestablish(crypto_ret_si); |
