}
EXPORT_SYMBOL_GPL(crypto_create_tfm_node);
-void *crypto_clone_tfm(const struct crypto_type *frontend,
- struct crypto_tfm *otfm)
-{
- struct crypto_alg *alg = otfm->__crt_alg;
- struct crypto_tfm *tfm;
- char *mem;
-
- mem = ERR_PTR(-ESTALE);
- if (unlikely(!crypto_mod_get(alg)))
- goto out;
-
- mem = crypto_alloc_tfmmem(alg, frontend, otfm->node, GFP_ATOMIC);
- if (IS_ERR(mem)) {
- crypto_mod_put(alg);
- goto out;
- }
-
- tfm = (struct crypto_tfm *)(mem + frontend->tfmsize);
- tfm->crt_flags = otfm->crt_flags;
- tfm->fb = tfm;
-
-out:
- return mem;
-}
-EXPORT_SYMBOL_GPL(crypto_clone_tfm);
-
struct crypto_alg *crypto_find_alg(const char *alg_name,
const struct crypto_type *frontend,
u32 type, u32 mask)
u32 mask);
void *crypto_create_tfm_node(struct crypto_alg *alg,
const struct crypto_type *frontend, int node);
-void *crypto_clone_tfm(const struct crypto_type *frontend,
- struct crypto_tfm *otfm);
static inline void *crypto_create_tfm(struct crypto_alg *alg,
const struct crypto_type *frontend)