Lines Matching refs:spawn
112 struct crypto_spawn *spawn, *n; in crypto_more_spawns() local
114 spawn = list_first_entry_or_null(stack, struct crypto_spawn, list); in crypto_more_spawns()
115 if (!spawn) in crypto_more_spawns()
118 n = list_prev_entry(spawn, list); in crypto_more_spawns()
119 list_move(&spawn->list, secondary_spawns); in crypto_more_spawns()
125 if (!spawn->dead) in crypto_more_spawns()
161 struct crypto_spawn *spawn, *n; in crypto_remove_spawns() local
168 list_for_each_entry_safe(spawn, n, spawns, list) { in crypto_remove_spawns()
169 if ((spawn->alg->cra_flags ^ new_type) & spawn->mask) in crypto_remove_spawns()
172 list_move(&spawn->list, &top); in crypto_remove_spawns()
185 spawn = list_first_entry(spawns, struct crypto_spawn, in crypto_remove_spawns()
187 inst = spawn->inst; in crypto_remove_spawns()
189 list_move(&spawn->list, &stack); in crypto_remove_spawns()
190 spawn->dead = !spawn->registered || &inst->alg != nalg; in crypto_remove_spawns()
192 if (!spawn->registered) in crypto_remove_spawns()
228 list_for_each_entry_safe(spawn, n, &secondary_spawns, list) { in crypto_remove_spawns()
229 if (!spawn->dead) in crypto_remove_spawns()
230 list_move(&spawn->list, &spawn->alg->cra_users); in crypto_remove_spawns()
231 else if (spawn->registered) in crypto_remove_spawns()
232 crypto_remove_instance(spawn->inst, list); in crypto_remove_spawns()
654 struct crypto_spawn *spawn; in crypto_register_instance() local
669 for (spawn = inst->spawns; spawn;) { in crypto_register_instance()
672 if (spawn->dead) in crypto_register_instance()
675 next = spawn->next; in crypto_register_instance()
676 spawn->inst = inst; in crypto_register_instance()
677 spawn->registered = true; in crypto_register_instance()
679 fips_internal |= spawn->alg->cra_flags; in crypto_register_instance()
681 crypto_mod_put(spawn->alg); in crypto_register_instance()
683 spawn = next; in crypto_register_instance()
724 int crypto_grab_spawn(struct crypto_spawn *spawn, struct crypto_instance *inst, in crypto_grab_spawn() argument
737 alg = crypto_find_alg(name, spawn->frontend, in crypto_grab_spawn()
744 list_add(&spawn->list, &alg->cra_users); in crypto_grab_spawn()
745 spawn->alg = alg; in crypto_grab_spawn()
746 spawn->mask = mask; in crypto_grab_spawn()
747 spawn->next = inst->spawns; in crypto_grab_spawn()
748 inst->spawns = spawn; in crypto_grab_spawn()
760 void crypto_drop_spawn(struct crypto_spawn *spawn) in crypto_drop_spawn() argument
762 if (!spawn->alg) /* not yet initialized? */ in crypto_drop_spawn()
766 if (!spawn->dead) in crypto_drop_spawn()
767 list_del(&spawn->list); in crypto_drop_spawn()
770 if (!spawn->registered) in crypto_drop_spawn()
771 crypto_mod_put(spawn->alg); in crypto_drop_spawn()
775 static struct crypto_alg *crypto_spawn_alg(struct crypto_spawn *spawn) in crypto_spawn_alg() argument
782 if (!spawn->dead) { in crypto_spawn_alg()
783 alg = spawn->alg; in crypto_spawn_alg()
800 struct crypto_tfm *crypto_spawn_tfm(struct crypto_spawn *spawn, u32 type, in crypto_spawn_tfm() argument
806 alg = crypto_spawn_alg(spawn); in crypto_spawn_tfm()
826 void *crypto_spawn_tfm2(struct crypto_spawn *spawn) in crypto_spawn_tfm2() argument
831 alg = crypto_spawn_alg(spawn); in crypto_spawn_tfm2()
835 tfm = crypto_create_tfm(alg, spawn->frontend); in crypto_spawn_tfm2()