Module Name: src
Committed By: pgoyette
Date: Wed Apr 8 15:27:18 UTC 2020
Modified Files:
src/sys/opencrypto: crypto.c
Log Message:
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
To generate a diff of this commit:
cvs rdiff -u -r1.113 -r1.114 src/sys/opencrypto/crypto.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/opencrypto/crypto.c
diff -u src/sys/opencrypto/crypto.c:1.113 src/sys/opencrypto/crypto.c:1.114
--- src/sys/opencrypto/crypto.c:1.113 Mon Mar 16 21:20:12 2020
+++ src/sys/opencrypto/crypto.c Wed Apr 8 15:27:18 2020
@@ -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; /* userla
*/
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);