mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
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:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user