Lines Matching refs:pctx
202 struct rng_parent_ctx *pctx;
205 pctx = kzalloc(sizeof(*pctx), GFP_KERNEL);
206 if (!pctx)
211 kfree(pctx);
215 pctx->drng = rng;
216 return pctx;
221 struct rng_parent_ctx *pctx = private;
223 if (unlikely(!pctx))
225 crypto_free_rng(pctx->drng);
226 kfree_sensitive(pctx->entropy);
227 kfree_sensitive(pctx);
243 struct rng_parent_ctx *pctx = private;
261 ctx->drng = pctx->drng;
266 * Non NULL pctx->entropy means that CAVP test has been initiated on
269 if (IS_ENABLED(CONFIG_CRYPTO_USER_API_RNG_CAVP) && pctx->entropy)
277 struct rng_parent_ctx *pctx = private;
282 return crypto_rng_reset(pctx->drng, seed, seedlen);
288 struct rng_parent_ctx *pctx = private;
294 if (pctx->entropy)
306 crypto_rng_alg(pctx->drng)->set_ent(pctx->drng, kentropy, len);
309 * buffer, save kentropy pointer to pctx now to free it after use.
311 pctx->entropy = kentropy;