Lines Matching refs:spawn

93  * This function adds a spawn to the list secondary_spawns which
95 * instances, unless the spawn happens to be one that is depended
106 struct crypto_spawn *spawn, *n;
108 spawn = list_first_entry_or_null(stack, struct crypto_spawn, list);
109 if (!spawn)
112 n = list_prev_entry(spawn, list);
113 list_move(&spawn->list, secondary_spawns);
119 if (!spawn->dead)
155 struct crypto_spawn *spawn, *n;
162 list_for_each_entry_safe(spawn, n, spawns, list) {
163 if ((spawn->alg->cra_flags ^ new_type) & spawn->mask)
166 list_move(&spawn->list, &top);
172 * from alg to the current spawn.
179 spawn = list_first_entry(spawns, struct crypto_spawn,
181 inst = spawn->inst;
183 list_move(&spawn->list, &stack);
184 spawn->dead = !spawn->registered || &inst->alg != nalg;
186 if (!spawn->registered)
197 * Even if spawn->registered is true, the
222 list_for_each_entry_safe(spawn, n, &secondary_spawns, list) {
223 if (!spawn->dead)
224 list_move(&spawn->list, &spawn->alg->cra_users);
225 else if (spawn->registered)
226 crypto_remove_instance(spawn->inst, list);
619 struct crypto_spawn *spawn;
632 for (spawn = inst->spawns; spawn;) {
635 if (spawn->dead)
638 next = spawn->next;
639 spawn->inst = inst;
640 spawn->registered = true;
642 crypto_mod_put(spawn->alg);
644 spawn = next;
684 int crypto_grab_spawn(struct crypto_spawn *spawn, struct crypto_instance *inst,
697 alg = crypto_find_alg(name, spawn->frontend, type, mask);
703 list_add(&spawn->list, &alg->cra_users);
704 spawn->alg = alg;
705 spawn->mask = mask;
706 spawn->next = inst->spawns;
707 inst->spawns = spawn;
719 void crypto_drop_spawn(struct crypto_spawn *spawn)
721 if (!spawn->alg) /* not yet initialized? */
725 if (!spawn->dead)
726 list_del(&spawn->list);
729 if (!spawn->registered)
730 crypto_mod_put(spawn->alg);
734 static struct crypto_alg *crypto_spawn_alg(struct crypto_spawn *spawn)
741 if (!spawn->dead) {
742 alg = spawn->alg;
759 struct crypto_tfm *crypto_spawn_tfm(struct crypto_spawn *spawn, u32 type,
765 alg = crypto_spawn_alg(spawn);
785 void *crypto_spawn_tfm2(struct crypto_spawn *spawn)
790 alg = crypto_spawn_alg(spawn);
794 tfm = crypto_create_tfm(alg, spawn->frontend);