Skip to content

Commit 08e97ae

Browse files
committed
Revert "hwrng: core - Freeze khwrng thread during suspend"
This reverts commit 03a3bb7 ("hwrng: core - Freeze khwrng thread during suspend"), ff29629 ("random: Support freezable kthreads in add_hwgenerator_randomness()") and 59b5694 ("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: Herbert Xu <[email protected]>
1 parent f703964 commit 08e97ae

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

drivers/char/hw_random/core.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#include <linux/delay.h>
1414
#include <linux/device.h>
1515
#include <linux/err.h>
16-
#include <linux/freezer.h>
1716
#include <linux/fs.h>
1817
#include <linux/hw_random.h>
1918
#include <linux/kernel.h>
@@ -422,9 +421,7 @@ static int hwrng_fillfn(void *unused)
422421
{
423422
long rc;
424423

425-
set_freezable();
426-
427-
while (!kthread_freezable_should_stop(NULL)) {
424+
while (!kthread_should_stop()) {
428425
struct hwrng *rng;
429426

430427
rng = get_current_rng();

drivers/char/random.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,6 @@
327327
#include <linux/percpu.h>
328328
#include <linux/cryptohash.h>
329329
#include <linux/fips.h>
330-
#include <linux/freezer.h>
331330
#include <linux/ptrace.h>
332331
#include <linux/workqueue.h>
333332
#include <linux/irq.h>
@@ -2440,8 +2439,7 @@ void add_hwgenerator_randomness(const char *buffer, size_t count,
24402439
* We'll be woken up again once below random_write_wakeup_thresh,
24412440
* or when the calling thread is about to terminate.
24422441
*/
2443-
wait_event_freezable(random_write_wait,
2444-
kthread_should_stop() ||
2442+
wait_event_interruptible(random_write_wait, kthread_should_stop() ||
24452443
ENTROPY_BITS(&input_pool) <= random_write_wakeup_bits);
24462444
mix_pool_bytes(poolp, buffer, count);
24472445
credit_entropy_bits(poolp, entropy);

0 commit comments

Comments
 (0)