Messages in this thread Patch in this message | | | Date | Wed, 18 Nov 2009 19:32:02 -0500 | From | "Youquan,Song" <> | Subject | [PATCH]crypto: Fix algorithm and driver duplicate registered |
| |
Current kernel, All the algorithms with same algorithm name and driver name are registered. But the proper behaviour should be only one algorithm be registered when algorithm and driver name duplicate.
Signed-off-by: Youquan, Song <youquan.song@intel.com> ---
diff --git a/crypto/algapi.c b/crypto/algapi.c index f149b1c..a823fb2 100644 --- a/crypto/algapi.c +++ b/crypto/algapi.c @@ -207,8 +207,8 @@ static struct crypto_larval *__crypto_register_alg(struct crypto_alg *alg) continue; } - if (!strcmp(q->cra_driver_name, alg->cra_name) || - !strcmp(q->cra_name, alg->cra_driver_name)) + if (!strcmp(q->cra_driver_name, alg->cra_driver_name) && + !strcmp(q->cra_name, alg->cra_name)) goto err; }
| |