]> Pileus Git - ~andy/linux/blobdiff - drivers/char/random.c
random32: add prandom_reseed_late() and call when nonblocking pool becomes initialized
[~andy/linux] / drivers / char / random.c
index 7a744d39175638a381835a8cadce7039f58ee3bf..4fe5609eeb72beb69e31ed1e7832585eafe0c591 100644 (file)
@@ -603,8 +603,11 @@ retry:
 
        if (!r->initialized && nbits > 0) {
                r->entropy_total += nbits;
-               if (r->entropy_total > 128)
+               if (r->entropy_total > 128) {
                        r->initialized = 1;
+                       if (r == &nonblocking_pool)
+                               prandom_reseed_late();
+               }
        }
 
        trace_credit_entropy_bits(r->name, nbits, entropy_count,