]> git.baikalelectronics.ru Git - kernel.git/commit
random: wake up /dev/random writers after zap
authorJason A. Donenfeld <Jason@zx2c4.com>
Fri, 28 Jan 2022 22:44:03 +0000 (23:44 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Fri, 4 Feb 2022 18:22:32 +0000 (19:22 +0100)
commitfb050d49fefe8cdfc4c26896493bcf139f7bfd40
treeb0f1c07c6222f4aa408dfa7aff26fbefb0bdc2db
parent78f0f7ef8574dbf4a2528ce4c98d6dd68cd52494
random: wake up /dev/random writers after zap

When account() is called, and the amount of entropy dips below
random_write_wakeup_bits, we wake up the random writers, so that they
can write some more in. However, the RNDZAPENTCNT/RNDCLEARPOOL ioctl
sets the entropy count to zero -- a potential reduction just like
account() -- but does not unblock writers. This commit adds the missing
logic to that ioctl to unblock waiting writers.

Reviewed-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
drivers/char/random.c