diff options
-rw-r--r-- | drivers/char/random.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/random.c b/drivers/char/random.c index 11c23ca57430..ee0c0d18f1eb 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -709,7 +709,8 @@ retry: } /* should we wake readers? */ - if (entropy_bits >= random_read_wakeup_bits) { + if (entropy_bits >= random_read_wakeup_bits && + wq_has_sleeper(&random_read_wait)) { wake_up_interruptible(&random_read_wait); kill_fasync(&fasync, SIGIO, POLL_IN); } |