Commit 08e97aec authored by Herbert Xu's avatar Herbert Xu

Revert "hwrng: core - Freeze khwrng thread during suspend"

This reverts commit 03a3bb7a ("hwrng: core - Freeze khwrng
thread during suspend"), ff296293 ("random: Support freezable
kthreads in add_hwgenerator_randomness()") and 59b56948 ("random:
Use wait_event_freezable() in add_hwgenerator_randomness()").

These patches introduced regressions and we need more time to
get them ready for mainline.
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent f703964f
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/device.h> #include <linux/device.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/freezer.h>
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/hw_random.h> #include <linux/hw_random.h>
#include <linux/kernel.h> #include <linux/kernel.h>
...@@ -422,9 +421,7 @@ static int hwrng_fillfn(void *unused) ...@@ -422,9 +421,7 @@ static int hwrng_fillfn(void *unused)
{ {
long rc; long rc;
set_freezable(); while (!kthread_should_stop()) {
while (!kthread_freezable_should_stop(NULL)) {
struct hwrng *rng; struct hwrng *rng;
rng = get_current_rng(); rng = get_current_rng();
......
...@@ -327,7 +327,6 @@ ...@@ -327,7 +327,6 @@
#include <linux/percpu.h> #include <linux/percpu.h>
#include <linux/cryptohash.h> #include <linux/cryptohash.h>
#include <linux/fips.h> #include <linux/fips.h>
#include <linux/freezer.h>
#include <linux/ptrace.h> #include <linux/ptrace.h>
#include <linux/workqueue.h> #include <linux/workqueue.h>
#include <linux/irq.h> #include <linux/irq.h>
...@@ -2440,8 +2439,7 @@ void add_hwgenerator_randomness(const char *buffer, size_t count, ...@@ -2440,8 +2439,7 @@ void add_hwgenerator_randomness(const char *buffer, size_t count,
* We'll be woken up again once below random_write_wakeup_thresh, * We'll be woken up again once below random_write_wakeup_thresh,
* or when the calling thread is about to terminate. * or when the calling thread is about to terminate.
*/ */
wait_event_freezable(random_write_wait, wait_event_interruptible(random_write_wait, kthread_should_stop() ||
kthread_should_stop() ||
ENTROPY_BITS(&input_pool) <= random_write_wakeup_bits); ENTROPY_BITS(&input_pool) <= random_write_wakeup_bits);
mix_pool_bytes(poolp, buffer, count); mix_pool_bytes(poolp, buffer, count);
credit_entropy_bits(poolp, entropy); credit_entropy_bits(poolp, entropy);
......
Markdown is supported
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