Commit 5bba83eb authored by Jason A. Donenfeld's avatar Jason A. Donenfeld Committed by Jialin Zhang
Browse files

random: clamp credited irq bits to maximum mixed

stable inclusion
from stable-v5.10.148
commit 011399a3f926bcc8175610cbcb8981d512b11a17
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I6D0WL

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=011399a3f926bcc8175610cbcb8981d512b11a17



--------------------------------

commit e78a802a upstream.

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

Fixes: e3e33fc2 ("random: do not use input pool from hard IRQs")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
Reviewed-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 8852b6ca
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment