From fabb7bbac9818e7738d9c31037a1b0e78ebbdd29 Mon Sep 17 00:00:00 2001 From: Stephan Mueller Date: Sun, 6 Jul 2014 02:25:04 +0200 Subject: [PATCH] crypto: drbg - Select correct DRBG core for stdrng When the DRBG is initialized, the core is looked up using the DRBG name. The name that can be used for the lookup is registered in cra_driver_name. The cra_name value contains stdrng. Thus, the lookup code must use crypto_tfm_alg_driver_name to obtain the precise DRBG name and select the correct DRBG. Signed-off-by: Stephan Mueller Signed-off-by: Herbert Xu --- crypto/drbg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/drbg.c b/crypto/drbg.c index dba5ed2f83b62..2a7860f73288b 100644 --- a/crypto/drbg.c +++ b/crypto/drbg.c @@ -1761,7 +1761,7 @@ static int drbg_kcapi_init(struct crypto_tfm *tfm) bool pr = false; int coreref = 0; - drbg_convert_tfm_core(crypto_tfm_alg_name(tfm), &coreref, &pr); + drbg_convert_tfm_core(crypto_tfm_alg_driver_name(tfm), &coreref, &pr); /* * when personalization string is needed, the caller must call reset * and provide the personalization string as seed information -- 2.39.5