提交 d8058480 编写于 作者: H Herbert Xu 提交者: David S. Miller

[CRYPTO] api: Explain the comparison on larval cra_name

This patch adds a comment to explain why we compare the cra_driver_name of
the algorithm being registered against the cra_name of a larval as opposed
to the cra_driver_name of the larval.

In fact larvals have only one name, cra_name which is the name that was
requested by the user.  The test here is simply trying to find out whether
the algorithm being registered can or can not satisfy the larval.
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 70613783
......@@ -149,6 +149,11 @@ static int __crypto_register_alg(struct crypto_alg *alg,
if (crypto_is_larval(q)) {
struct crypto_larval *larval = (void *)q;
/*
* Check to see if either our generic name or
* specific name can satisfy the name requested
* by the larval entry q.
*/
if (strcmp(alg->cra_name, q->cra_name) &&
strcmp(alg->cra_driver_name, q->cra_name))
continue;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册