Lines Matching defs:larval
58 static inline int crypto_is_test_larval(struct crypto_larval *larval)
60 return larval->alg.cra_driver_name[0];
105 struct crypto_larval *larval = (void *)alg;
108 if (larval->adult)
109 crypto_mod_put(larval->adult);
110 kfree(larval);
115 struct crypto_larval *larval;
117 larval = kzalloc(sizeof(*larval), GFP_KERNEL);
118 if (!larval)
121 larval->mask = mask;
122 larval->alg.cra_flags = CRYPTO_ALG_LARVAL | type;
123 larval->alg.cra_priority = -1;
124 larval->alg.cra_destroy = crypto_larval_destroy;
126 strlcpy(larval->alg.cra_name, name, CRYPTO_MAX_ALG_NAME);
127 init_completion(&larval->completion);
129 return larval;
137 struct crypto_larval *larval;
139 larval = crypto_larval_alloc(name, type, mask);
140 if (IS_ERR(larval))
141 return ERR_CAST(larval);
143 atomic_set(&larval->alg.cra_refcnt, 2);
148 alg = &larval->alg;
153 if (alg != &larval->alg)
154 kfree(larval);
161 struct crypto_larval *larval = (void *)alg;
166 complete_all(&larval->completion);
173 struct crypto_larval *larval = (void *)alg;
177 &larval->completion, 60 * HZ);
179 alg = larval->adult;
186 else if (crypto_is_test_larval(larval) &&
191 crypto_mod_put(&larval->alg);
253 struct crypto_alg *larval;
261 larval = crypto_larval_lookup(name, type, mask);
262 if (IS_ERR(larval) || !crypto_is_larval(larval))
263 return larval;
265 ok = crypto_probing_notify(CRYPTO_MSG_ALG_REQUEST, larval);
268 alg = crypto_larval_wait(larval);
270 crypto_mod_put(larval);
273 crypto_larval_kill(larval);