diff options
| author | pgoyette <pgoyette@NetBSD.org> | 2020-04-08 15:27:18 +0000 |
|---|---|---|
| committer | pgoyette <pgoyette@NetBSD.org> | 2020-04-08 15:27:18 +0000 |
| commit | 0dd4a28b0a56a50233c593f954cda60f78b7e235 (patch) | |
| tree | 9c851bd3da4c4b8ca1659e1992af8b38ac26d240 /sys/opencrypto | |
| parent | c50b6ae78268c61a46adf6ac769d5123dbfb4a4c (diff) | |
Revert previous change to use SYSCTL_SETUP since it breaks on macppc.
For some reason, the crypto module fails to link, and this results in
opencrypto sysctl failures.
Should resolve PR kern/55154
Diffstat (limited to 'sys/opencrypto')
| -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); |
