Lines Matching refs:larval

221 	struct crypto_larval *larval;  in crypto_alloc_test_larval()  local
226 larval = crypto_larval_alloc(alg->cra_name, in crypto_alloc_test_larval()
228 if (IS_ERR(larval)) in crypto_alloc_test_larval()
229 return larval; in crypto_alloc_test_larval()
231 larval->adult = crypto_mod_get(alg); in crypto_alloc_test_larval()
232 if (!larval->adult) { in crypto_alloc_test_larval()
233 kfree(larval); in crypto_alloc_test_larval()
237 refcount_set(&larval->alg.cra_refcnt, 1); in crypto_alloc_test_larval()
238 memcpy(larval->alg.cra_driver_name, alg->cra_driver_name, in crypto_alloc_test_larval()
240 larval->alg.cra_priority = alg->cra_priority; in crypto_alloc_test_larval()
242 return larval; in crypto_alloc_test_larval()
248 struct crypto_larval *larval; in __crypto_register_alg() local
279 larval = crypto_alloc_test_larval(alg); in __crypto_register_alg()
280 if (IS_ERR(larval)) in __crypto_register_alg()
285 if (larval) in __crypto_register_alg()
286 list_add(&larval->alg.cra_list, &crypto_alg_list); in __crypto_register_alg()
293 return larval; in __crypto_register_alg()
296 larval = ERR_PTR(ret); in __crypto_register_alg()
353 struct crypto_larval *larval = (void *)q; in crypto_alg_tested() local
364 if (larval->adult) in crypto_alg_tested()
366 if ((q->cra_flags ^ alg->cra_flags) & larval->mask) in crypto_alg_tested()
370 larval->adult = alg; in crypto_alg_tested()
372 larval->adult = ERR_PTR(-EAGAIN); in crypto_alg_tested()
411 struct crypto_larval *larval; in crypto_register_alg() local
421 larval = __crypto_register_alg(alg); in crypto_register_alg()
423 if (!IS_ERR_OR_NULL(larval)) in crypto_register_alg()
424 larval->test_started = test_started; in crypto_register_alg()
427 if (IS_ERR_OR_NULL(larval)) in crypto_register_alg()
428 return PTR_ERR(larval); in crypto_register_alg()
431 crypto_wait_for_test(larval); in crypto_register_alg()
605 struct crypto_larval *larval; in crypto_register_instance() local
618 larval = ERR_PTR(-EAGAIN); in crypto_register_instance()
634 larval = __crypto_register_alg(&inst->alg); in crypto_register_instance()
635 if (IS_ERR(larval)) in crypto_register_instance()
637 else if (larval) in crypto_register_instance()
638 larval->test_started = true; in crypto_register_instance()
646 err = PTR_ERR(larval); in crypto_register_instance()
647 if (IS_ERR_OR_NULL(larval)) in crypto_register_instance()
650 crypto_wait_for_test(larval); in crypto_register_instance()
1271 struct crypto_larval *larval = NULL; in crypto_start_tests() local
1291 larval = l; in crypto_start_tests()
1297 if (!larval) in crypto_start_tests()
1300 crypto_wait_for_test(larval); in crypto_start_tests()