Patch "hwrng: core - Clean up RNG list when last hwrng is unregistered" has been added to the 4.15-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
hwrng: core - Clean up RNG list when last hwrng is unregistered
to the 4.15-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
hwrng-core-clean-up-rng-list-when-last-hwrng-is-unregistered.patch
and it can be found in the queue-4.15 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Thu Mar 22 14:03:40 CET 2018
From: Gary R Hook <[email protected]>
Date: Fri, 15 Dec 2017 13:55:59 -0600
Subject: hwrng: core - Clean up RNG list when last hwrng is unregistered
From: Gary R Hook <[email protected]>
[ Upstream commit 0e4b52942b1c76f89e0dcb829f72e123d0678f54 ]
Commit 142a27f0a731 added support for a "best" RNG, and in doing so introduced a hang from rmmod/modprobe -r when the last RNG on the list was unloaded.
When the hwrng list is depleted, return the global variables to their original state and decrement all references to the object.
--- drivers/char/hw_random/core.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/char/hw_random/core.c +4 -0
@@ -306,6 +306,10 @@ static int enable_best_rng(void) ret = ((new_rng == current_rng) ?0 :set_current_rng (new_rng));if (!ret) cur_rng_set_by_user =0 ; + }else { +drop_current_rng (); + cur_rng_set_by_user =0 ; + ret =0 ; }return ret;
Patches currently in stable-queue which might be from [email protected] are
queue-4.15/hwrng-core-clean-up-rng-list-when-last-hwrng-is-unregistered.patch