summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2023-12-07 13:36:57 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2023-12-15 12:52:53 +0300
commit27016f75f5ed47e2d8e0ca75a8ff1f40bc1a5e27 (patch)
tree35ccc0f665245bfa9b57a9c5d8835c3999fc466a /crypto
parent979f6ded93ac5ca0fec2b4c5b7b668c8a2a65e1b (diff)
downloadlinux-27016f75f5ed47e2d8e0ca75a8ff1f40bc1a5e27.tar.xz
crypto: api - Disallow identical driver names
Disallow registration of two algorithms with identical driver names. Cc: <stable@vger.kernel.org> Reported-by: Ovidiu Panait <ovidiu.panait@windriver.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/algapi.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/algapi.c b/crypto/algapi.c
index 4fe95c448047..85bc279b4233 100644
--- a/crypto/algapi.c
+++ b/crypto/algapi.c
@@ -341,6 +341,7 @@ __crypto_register_alg(struct crypto_alg *alg, struct list_head *algs_to_put)
}
if (!strcmp(q->cra_driver_name, alg->cra_name) ||
+ !strcmp(q->cra_driver_name, alg->cra_driver_name) ||
!strcmp(q->cra_name, alg->cra_driver_name))
goto err;
}