• Home
  • Raw
  • Download

Lines Matching refs:larval

222 	struct crypto_larval *larval;  in __crypto_register_alg()  local
254 larval = crypto_larval_alloc(alg->cra_name, in __crypto_register_alg()
256 if (IS_ERR(larval)) in __crypto_register_alg()
260 larval->adult = crypto_mod_get(alg); in __crypto_register_alg()
261 if (!larval->adult) in __crypto_register_alg()
264 refcount_set(&larval->alg.cra_refcnt, 1); in __crypto_register_alg()
265 memcpy(larval->alg.cra_driver_name, alg->cra_driver_name, in __crypto_register_alg()
267 larval->alg.cra_priority = alg->cra_priority; in __crypto_register_alg()
270 list_add(&larval->alg.cra_list, &crypto_alg_list); in __crypto_register_alg()
275 return larval; in __crypto_register_alg()
278 kfree(larval); in __crypto_register_alg()
280 larval = ERR_PTR(ret); in __crypto_register_alg()
337 struct crypto_larval *larval = (void *)q; in crypto_alg_tested() local
348 if (larval->adult) in crypto_alg_tested()
350 if ((q->cra_flags ^ alg->cra_flags) & larval->mask) in crypto_alg_tested()
354 larval->adult = alg; in crypto_alg_tested()
356 larval->adult = ERR_PTR(-EAGAIN); in crypto_alg_tested()
393 static void crypto_wait_for_test(struct crypto_larval *larval) in crypto_wait_for_test() argument
397 err = crypto_probing_notify(CRYPTO_MSG_ALG_REGISTER, larval->adult); in crypto_wait_for_test()
401 crypto_alg_tested(larval->alg.cra_driver_name, 0); in crypto_wait_for_test()
404 err = wait_for_completion_killable(&larval->completion); in crypto_wait_for_test()
407 crypto_notify(CRYPTO_MSG_ALG_LOADED, larval); in crypto_wait_for_test()
410 crypto_larval_kill(&larval->alg); in crypto_wait_for_test()
415 struct crypto_larval *larval; in crypto_register_alg() local
424 larval = __crypto_register_alg(alg); in crypto_register_alg()
427 if (IS_ERR(larval)) in crypto_register_alg()
428 return PTR_ERR(larval); in crypto_register_alg()
430 crypto_wait_for_test(larval); in crypto_register_alg()
606 struct crypto_larval *larval; in crypto_register_instance() local
619 larval = ERR_PTR(-EAGAIN); in crypto_register_instance()
635 larval = __crypto_register_alg(&inst->alg); in crypto_register_instance()
636 if (IS_ERR(larval)) in crypto_register_instance()
645 err = PTR_ERR(larval); in crypto_register_instance()
646 if (IS_ERR(larval)) in crypto_register_instance()
649 crypto_wait_for_test(larval); in crypto_register_instance()