]> err.no Git - linux-2.6/blobdiff - crypto/algapi.c
hugetlb: fix pool resizing corner case
[linux-2.6] / crypto / algapi.c
index d891f56f0e8cdb9d6d843c8209518282d70e8b7c..8ff8c2656d9c492902a5608436c145965f52723f 100644 (file)
@@ -63,9 +63,6 @@ static int crypto_check_alg(struct crypto_alg *alg)
        if (alg->cra_alignmask & (alg->cra_alignmask + 1))
                return -EINVAL;
 
-       if (alg->cra_alignmask & alg->cra_blocksize)
-               return -EINVAL;
-
        if (alg->cra_blocksize > PAGE_SIZE / 8)
                return -EINVAL;
 
@@ -152,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;