module: icp: use original mechanisms

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12901
This commit is contained in:
наб
2021-12-23 18:44:07 +01:00
committed by Brian Behlendorf
parent bcee18d4e0
commit 167ced3fb1
5 changed files with 11 additions and 20 deletions
+3 -3
View File
@@ -280,7 +280,7 @@ kcf_init_mech_tabs(void)
* KCF_SUCCESS otherwise.
*/
static int
kcf_create_mech_entry(kcf_ops_class_t class, char *mechname)
kcf_create_mech_entry(kcf_ops_class_t class, const char *mechname)
{
crypto_mech_type_t mt;
kcf_mech_entry_t *me_tab;
@@ -365,7 +365,7 @@ kcf_add_mech_provider(short mech_indx,
{
int error;
kcf_mech_entry_t *mech_entry = NULL;
crypto_mech_info_t *mech_info;
const crypto_mech_info_t *mech_info;
crypto_mech_type_t kcf_mech_type;
kcf_prov_mech_desc_t *prov_mech;
@@ -491,7 +491,7 @@ kcf_add_mech_provider(short mech_indx,
* User context only.
*/
void
kcf_remove_mech_provider(char *mech_name, kcf_provider_desc_t *prov_desc)
kcf_remove_mech_provider(const char *mech_name, kcf_provider_desc_t *prov_desc)
{
crypto_mech_type_t mech_type;
kcf_prov_mech_desc_t *prov_mech = NULL, *prov_chain;
-8
View File
@@ -206,9 +206,6 @@ kcf_alloc_provider_desc(const crypto_provider_info_t *info)
kcf_provider_desc_t *desc =
kmem_zalloc(sizeof (kcf_provider_desc_t), KM_SLEEP);
desc->pd_mech_list_count = info->pi_mech_list_count;
desc->pd_mechanisms = kmem_zalloc(sizeof (crypto_mech_info_t) *
info->pi_mech_list_count, KM_SLEEP);
for (int i = 0; i < KCF_OPS_CLASSSIZE; i++)
for (int j = 0; j < KCF_MAXMECHTAB; j++)
desc->pd_mech_indx[i][j] = KCF_INVALID_INDX;
@@ -272,11 +269,6 @@ kcf_free_provider_desc(kcf_provider_desc_t *desc)
/* free the kernel memory associated with the provider descriptor */
if (desc->pd_mechanisms != NULL)
/* free the memory associated with the mechanism info's */
kmem_free(desc->pd_mechanisms, sizeof (crypto_mech_info_t) *
desc->pd_mech_list_count);
if (desc->pd_sched_info.ks_taskq != NULL)
taskq_destroy(desc->pd_sched_info.ks_taskq);