From 3e0b8c10d086231163bd31b6e676b849132aaf71 Mon Sep 17 00:00:00 2001 From: farovitus Date: Fri, 7 Sep 2018 20:45:55 +0300 Subject: [PATCH] char: random: Fix Deep Sleep issue Device has been reported to not enter Deep Sleep state at all due to upstreaming, turned out it's caused by a change in f41fc0bfede5 "random: initialize the non-blocking pool via add_hwgenerator_randomness()" Fix this issue by choosing 'wait_event_freezable' instead of 'wait_event_interruptible' --- drivers/char/random.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/random.c b/drivers/char/random.c index 8800d54e7447..607852d06554 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -1897,7 +1897,7 @@ void add_hwgenerator_randomness(const char *buffer, size_t count, * random_write_wakeup_thresh, or when the calling * thread is about to terminate. */ - wait_event_interruptible(random_write_wait, + wait_event_freezable(random_write_wait, kthread_should_stop() || ENTROPY_BITS(&input_pool) <= random_write_wakeup_bits); }