diff options
author | Joel Stanley <joel@jms.id.au> | 2022-03-08 10:48:37 +0300 |
---|---|---|
committer | Joel Stanley <joel@jms.id.au> | 2022-03-08 10:48:40 +0300 |
commit | c4c3fba61580d267568c5c9cf10c928a41ba38a4 (patch) | |
tree | 96e9f51838e6b792a9d099c7580faeb51eb7d5bd /drivers/char | |
parent | de0980ea2d5360bd1d7472e62231a03c108f20c2 (diff) | |
parent | 8993e6067f263765fd26edabf3e3012e3ec4d81e (diff) | |
download | linux-c4c3fba61580d267568c5c9cf10c928a41ba38a4.tar.xz |
Merge tag 'v5.15.26' into dev-5.15
This is the 5.15.26 stable release
Signed-off-by: Joel Stanley <joel@jms.id.au>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/random.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/char/random.c b/drivers/char/random.c index a27ae3999ff3..ebe86de9d0ac 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -1963,7 +1963,10 @@ static long random_ioctl(struct file *f, unsigned int cmd, unsigned long arg) */ if (!capable(CAP_SYS_ADMIN)) return -EPERM; - input_pool.entropy_count = 0; + if (xchg(&input_pool.entropy_count, 0) && random_write_wakeup_bits) { + wake_up_interruptible(&random_write_wait); + kill_fasync(&fasync, SIGIO, POLL_OUT); + } return 0; case RNDRESEEDCRNG: if (!capable(CAP_SYS_ADMIN)) |