mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
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: be4000bc46
"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>
This commit is contained in:
parent
5afcc6e08a
commit
7740dd2d25
1 changed files with 1 additions and 1 deletions
|
@ -333,7 +333,7 @@ static int hwrng_fillfn(void *unused)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
add_hwgenerator_randomness((void *)rng_fillbuf, rc,
|
add_hwgenerator_randomness((void *)rng_fillbuf, rc,
|
||||||
(rc*current_quality)>>10);
|
rc * current_quality * 8 >> 10);
|
||||||
}
|
}
|
||||||
hwrng_fill = NULL;
|
hwrng_fill = NULL;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue