]> git.baikalelectronics.ru Git - kernel.git/commit
random: don't zap entropy count in rand_initialize()
authorTheodore Ts'o <tytso@mit.edu>
Sun, 3 Nov 2013 12:56:17 +0000 (07:56 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 3 Nov 2013 23:18:49 +0000 (18:18 -0500)
commit75b1ea10c42b47a53ec60f49d99eb73f6b7496c4
tree6aeb29fb1d59dcf1d9a3c43252b9ac4834fff177
parent44d260d0441b76245213c1d58431405eb414d4ee
random: don't zap entropy count in rand_initialize()

The rand_initialize() function was being run fairly late in the kernel
boot sequence.  This was unfortunate, since it zero'ed the entropy
counters, thus throwing away credit that was accumulated earlier in
the boot sequence, and it also meant that initcall functions run
before rand_initialize were using a minimally initialized pool.

To fix this, fix init_std_data() to no longer zap the entropy counter;
it wasn't necessary, and move rand_initialize() to be an early
initcall.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
drivers/char/random.c