Lines Matching refs:larval

207 	struct crypto_larval *larval;  in __crypto_register_alg()  local
238 larval = crypto_larval_alloc(alg->cra_name, in __crypto_register_alg()
240 if (IS_ERR(larval)) in __crypto_register_alg()
244 larval->adult = crypto_mod_get(alg); in __crypto_register_alg()
245 if (!larval->adult) in __crypto_register_alg()
248 refcount_set(&larval->alg.cra_refcnt, 1); in __crypto_register_alg()
249 memcpy(larval->alg.cra_driver_name, alg->cra_driver_name, in __crypto_register_alg()
251 larval->alg.cra_priority = alg->cra_priority; in __crypto_register_alg()
254 list_add(&larval->alg.cra_list, &crypto_alg_list); in __crypto_register_alg()
257 return larval; in __crypto_register_alg()
260 kfree(larval); in __crypto_register_alg()
262 larval = ERR_PTR(ret); in __crypto_register_alg()
303 struct crypto_larval *larval = (void *)q; in crypto_alg_tested() local
314 if (larval->adult) in crypto_alg_tested()
316 if ((q->cra_flags ^ alg->cra_flags) & larval->mask) in crypto_alg_tested()
321 larval->adult = alg; in crypto_alg_tested()
357 static void crypto_wait_for_test(struct crypto_larval *larval) in crypto_wait_for_test() argument
361 err = crypto_probing_notify(CRYPTO_MSG_ALG_REGISTER, larval->adult); in crypto_wait_for_test()
365 crypto_alg_tested(larval->alg.cra_driver_name, 0); in crypto_wait_for_test()
368 err = wait_for_completion_killable(&larval->completion); in crypto_wait_for_test()
372 crypto_larval_kill(&larval->alg); in crypto_wait_for_test()
377 struct crypto_larval *larval; in crypto_register_alg() local
386 larval = __crypto_register_alg(alg); in crypto_register_alg()
389 if (IS_ERR(larval)) in crypto_register_alg()
390 return PTR_ERR(larval); in crypto_register_alg()
392 crypto_wait_for_test(larval); in crypto_register_alg()
546 struct crypto_larval *larval; in crypto_register_instance() local
558 larval = __crypto_register_alg(&inst->alg); in crypto_register_instance()
559 if (IS_ERR(larval)) in crypto_register_instance()
568 err = PTR_ERR(larval); in crypto_register_instance()
569 if (IS_ERR(larval)) in crypto_register_instance()
572 crypto_wait_for_test(larval); in crypto_register_instance()