crypto: api - Disallow identical driver names
commit 27016f75f5ed47e2d8e0ca75a8ff1f40bc1a5e27 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
72f021135f
commit
a389ddcd0b
1 changed files with 1 additions and 0 deletions
|
@ -246,6 +246,7 @@ static struct crypto_larval *__crypto_register_alg(struct crypto_alg *alg)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!strcmp(q->cra_driver_name, alg->cra_name) ||
|
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))
|
!strcmp(q->cra_name, alg->cra_driver_name))
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue