Skip to content
Commit 0e4b5294 authored by Gary R Hook's avatar Gary R Hook Committed by Herbert Xu
Browse files

hwrng: core - Clean up RNG list when last hwrng is unregistered

Commit 142a27f0 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.

Fixes: 142a27f0

 ("hwrng: core - Reset user selected rng by writing "" to rng_current")
Signed-off-by: default avatarGary R Hook <gary.hook@amd.com>
Reviewed-by: default avatarPrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 871df319
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment