]> git.baikalelectronics.ru Git - kernel.git/commit
random: clamp credited irq bits to maximum mixed
authorJason A. Donenfeld <Jason@zx2c4.com>
Fri, 23 Sep 2022 00:42:51 +0000 (02:42 +0200)
committerJason A. Donenfeld <Jason@zx2c4.com>
Fri, 23 Sep 2022 10:31:05 +0000 (12:31 +0200)
commit9cf56e5cebbaf6cb6c2c7c54ac41903ecc0152c1
tree8e6b445d2afa1e8111d6047c1d12ee48d601ac3b
parentfbba47c84d7d01e1b5530d0991a9848f9bd85459
random: clamp credited irq bits to maximum mixed

Since the most that's mixed into the pool is sizeof(long)*2, don't
credit more than that many bytes of entropy.

Fixes: bcd9fd8727b6 ("random: do not use input pool from hard IRQs")
Cc: stable@vger.kernel.org
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
drivers/char/random.c