Re: [PATCH] hwrng: Explicitly drop current_rng when unregistering rng device

2018-02-04 Thread Keith Packard
Tom Lendacky writes: > A similar fix was already in the cryptodev tree and I thought was part of > a recent pull request. Yup, just saw it on master. I've checked and it will do pretty much the same thing as my patch, with the addition of clearing cur_rng_set_by_user, which is necessary. Thanks

Re: [PATCH] hwrng: Explicitly drop current_rng when unregistering rng device

2018-01-31 Thread Tom Lendacky
On 1/30/2018 5:26 PM, Keith Packard wrote: > When the currently in-use hw rng is being removed from the system, > explicitly drop it before using enable_best_rng as enable_best_rng > will not do anything if the list of avaialble RNGs is empty. > > Without this, the last RNG removed from the system

[PATCH] hwrng: Explicitly drop current_rng when unregistering rng device

2018-01-30 Thread Keith Packard
When the currently in-use hw rng is being removed from the system, explicitly drop it before using enable_best_rng as enable_best_rng will not do anything if the list of avaialble RNGs is empty. Without this, the last RNG removed from the system will never get cleaned up and hwrng_unregister will