aboutsummaryrefslogtreecommitdiffstats
path: root/module/icp
diff options
context:
space:
mode:
Diffstat (limited to 'module/icp')
-rw-r--r--module/icp/io/skein_mod.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/module/icp/io/skein_mod.c b/module/icp/io/skein_mod.c
index e909a7e31..705b1e819 100644
--- a/module/icp/io/skein_mod.c
+++ b/module/icp/io/skein_mod.c
@@ -231,6 +231,19 @@ skein_mod_init(void)
int
skein_mod_fini(void) {
+ int ret;
+
+ if (skein_prov_handle != 0) {
+ if ((ret = crypto_unregister_provider(skein_prov_handle)) !=
+ CRYPTO_SUCCESS) {
+ cmn_err(CE_WARN,
+ "skein _fini: crypto_unregister_provider() "
+ "failed (0x%x)", ret);
+ return (EBUSY);
+ }
+ skein_prov_handle = 0;
+ }
+
return (mod_remove(&modlinkage));
}