summaryrefslogtreecommitdiff
path: root/drivers/char/random.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-02-05 01:07:46 +0300
committerTheodore Ts'o <tytso@mit.edu>2018-03-01 01:59:21 +0300
commit25e3fca492035a2e1d4ac6e3b1edd9c1acd48897 (patch)
tree18b2960df3683d779c53b8f591463091eae30f19 /drivers/char/random.c
parent9f886f4d1d292442b2f22a0a33321eae821bde40 (diff)
downloadlinux-25e3fca492035a2e1d4ac6e3b1edd9c1acd48897.tar.xz
random: always fill buffer in get_random_bytes_wait
In the unfortunate event that a developer fails to check the return value of get_random_bytes_wait, or simply wants to make a "best effort" attempt, for whatever that's worth, it's much better to still fill the buffer with _something_ rather than catastrophically failing in the case of an interruption. This is both a defense in depth measure against inevitable programming bugs, as well as a means of making the API a bit more useful. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'drivers/char/random.c')
0 files changed, 0 insertions, 0 deletions