]> git.itanic.dy.fi Git - linux-stable/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)
commite78a802a7b4febf53f2a92842f494b01062d85a8
tree8e6b445d2afa1e8111d6047c1d12ee48d601ac3b
parentd775335e350fc07e1322960ee291dc9079ab938e
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: e3e33fc2ea7f ("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