]> git.baikalelectronics.ru Git - kernel.git/commit
random: tighten bound on random_read_wakeup_thresh
authorGreg Price <price@MIT.EDU>
Fri, 6 Dec 2013 00:19:29 +0000 (19:19 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 20 Mar 2014 02:18:51 +0000 (22:18 -0400)
commitd3a1d2f8163b6e31ef385708371aaec7d53200cb
treed84aea5260ad2eacc88f96f4f3fb9097a32f7bf5
parent43e972edd50e4df86cca5f33f9eb65697db0f583
random: tighten bound on random_read_wakeup_thresh

We use this value in a few places other than its literal meaning,
in particular in _xfer_secondary_pool() as a minimum number of
bits to pull from the input pool at a time into either output
pool.  It doesn't make sense to pull more bits than the whole size
of an output pool.

We could and possibly should separate the quantities "how much
should the input pool have to have to wake up /dev/random readers"
and "how much should we transfer from the input to an output pool
at a time", but nobody is likely to be sad they can't set the first
quantity to more than 1024 bits, so for now just limit them both.

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