summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-10-02 22:27:29 +0800
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 16:55:47 -0700
commit7b5f73a19cbf7582f924e16eabd19d44a2b77a61 (patch)
tree4a03e0415c9f0421cc9a77a9b25aec170b7e8f25 /crypto
parent19ac76f2eb1a2e81897420e24c77cf86feda5ede (diff)
downloadlinux-crypto-7b5f73a19cbf7582f924e16eabd19d44a2b77a61.tar.gz
linux-crypto-7b5f73a19cbf7582f924e16eabd19d44a2b77a61.zip
[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: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/algapi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/crypto/algapi.c b/crypto/algapi.c
index 58cc1916..8ff8c265 100644
--- a/crypto/algapi.c
+++ b/crypto/algapi.c
@@ -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;