2024-05-31 05:49:45

by Sergey Senozhatsky

[permalink] [raw]
Subject: Re: [PATCH 3/3] crypto: acomp - Add comp_params helpers

On (24/05/20 19:04), Herbert Xu wrote:
[..]
> +
> + params->dict = kvmemdup(dict, len, GFP_KERNEL);
> + if (!params->dict)
> + return -ENOMEM;
> + params->dict_sz = len;
> +
> + return 0;
> +}
> +EXPORT_SYMBOL_GPL(crypto_comp_getparams);
> +
> +void crypto_comp_putparams(struct crypto_comp_params *params)
> +{
> + kfree(params->dict);

kvfree()?

> + params->dict = NULL;
> + params->dict_sz = 0;
> +}
> +EXPORT_SYMBOL_GPL(crypto_comp_putparams);