]> git.baikalelectronics.ru Git - kernel.git/commit
hwrng: Pass entropy to add_hwgenerator_randomness() in bits, not bytes
authorStephen Boyd <sboyd@codeaurora.org>
Fri, 25 Jul 2014 22:19:18 +0000 (15:19 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 5 Aug 2014 20:50:10 +0000 (16:50 -0400)
commit5d0db70fb855490be388c73e9af6477871447de4
tree37bb8eb37e3d63932794f878a84d92dc8830e97f
parent02dd5225bc458e8b18ff9e4b0bf16f2d6aaea230
hwrng: Pass entropy to add_hwgenerator_randomness() in bits, not bytes

rng_get_data() returns the number of bytes read from the hardware.
The entropy argument to add_hwgenerator_randomness() is passed
directly to credit_entropy_bits() so we should be passing the
number of bits, not bytes here.

Fixes: 8f140b7496c "hwrng: create filler thread"
Acked-by: Torsten Duwe <duwe@suse.de>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
drivers/char/hw_random/core.c