aboutsummaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
Diffstat (limited to 'crypto')
-rw-r--r--crypto/ansi_cprng.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/crypto/ansi_cprng.c b/crypto/ansi_cprng.c
index 74478061ac0c..d80ed4c1e009 100644
--- a/crypto/ansi_cprng.c
+++ b/crypto/ansi_cprng.c
@@ -132,9 +132,15 @@ static int _get_more_prng_bytes(struct prng_context *ctx)
132 */ 132 */
133 if (!memcmp(ctx->rand_data, ctx->last_rand_data, 133 if (!memcmp(ctx->rand_data, ctx->last_rand_data,
134 DEFAULT_BLK_SZ)) { 134 DEFAULT_BLK_SZ)) {
135 if (fips_enabled) {
136 panic("cprng %p Failed repetition check!\n",
137 ctx);
138 }
139
135 printk(KERN_ERR 140 printk(KERN_ERR
136 "ctx %p Failed repetition check!\n", 141 "ctx %p Failed repetition check!\n",
137 ctx); 142 ctx);
143
138 ctx->flags |= PRNG_NEED_RESET; 144 ctx->flags |= PRNG_NEED_RESET;
139 return -EINVAL; 145 return -EINVAL;
140 } 146 }